Re: [master] Log storage in the same format as the main anaconda log (a part of #524980)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> :: the entry format and date format is standardized: do not show date but always show miliseconds
> :: includes a cleanup in the storage/storage_log.py code to use AnacondaLog

Could you please format your commit messages to wrap at 80 columns, and
don't include colons at the front?  Thanks.

> @@ -72,15 +74,15 @@ class AnacondaLog:
>  
>      # Add a simple handler - file or stream, depending on what we're given.
>      def addFileHandler (self, file, addToLogger, minLevel=DEFAULT_LEVEL,
> -                        fmtStr="%(asctime)s %(levelname)-8s: %(message)s",
> +                        fmtStr=DEFAULT_ENTRY_FORMAT,
>                          autoSetLevel=True):
> -        if type (file) == type ("string"):
> +        if isinstance(file, str):
>              logfileHandler = logging.FileHandler(file)
>          else:
>              logfileHandler = logging.StreamHandler(file)

Is there a reason for changing to using isinstance() here?  If you
really want to change this line, changing it to this would be better:

   import types
   if type(file) in types.StringTypes:
   ...

Assuming you tested it, everything else looks okay.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux