Hi,

in Ganeti we never use 'print', you need to use the logging framework to
see messages in appropriate logs. Look for 'logging.debug', 'logging.info'
etc. calls in the code to see how logging is used in Ganeti.

   Cheers,
   Petr

On Tue, Apr 21, 2015 at 10:25 AM Gangbiao Liu <[email protected]> wrote:

> Hi Petr,
>
> I have reproduced Issue 1030
> (https://code.google.com/p/ganeti/issues/detail?id=1030) in my Ubuntu
> 14.04. Now, I am debugging it. It seems that the gluster storage path
> is illegal. I have added my own log messages as follows.
>
> diff --git a/lib/storage/filestorage.py b/lib/storage/filestorage.py
> index 0e37d59..ea2d18a 100644
> --- a/lib/storage/filestorage.py
> +++ b/lib/storage/filestorage.py
> @@ -436,6 +436,7 @@ def CheckFileStoragePathAcceptance(
>                                        " was not accessible." % _filename)
>
>    if _ComputeWrongFileStoragePaths([path]):
> +    print "999 [path] is %s." % [path]
>      raise errors.FileStoragePathError("Path '%s' uses a forbidden prefix"
> %
>                                        path)
>
>
> However, I cannot get the log messages output either in stdout or any
> of ganeti log files under `/var/log/ganeti/`. I am wondering how to
> add personal debug messages in Ganeti tenderly. Would you please give
> me some suggestions?
>
>
> Thanks very much, Gangbiao
>

Reply via email to