[ckan-dev] Antwort: Log Output Location of paster serve Command

Nathan Hook nhook at ucar.edu
Mon Nov 21 16:20:16 UTC 2016


Hi Florian,

Thank you for the nice response.  Seeing your logging settings was quite
helpful and helped me see our paster serve command output.

One quick thing on your notes:

The ckan user must be the owner of the directory that it is trying to write
the log file to:

$ sudo mkdir /var/log/ckan
$ sudo chown ckan:ckan /var/log/ckan


AND come to find out...  The paster serve command prints out a paster.log
file in the base directory of the ckan virtual environment.  DOH!  All I
had to do was look in the base directory, and there was the log file...  Go
figure.

Thank you again for your nice reply and supplying your configuration, both
were quite helpful.

Regards,

Nathan

On Fri, Nov 11, 2016 at 1:20 AM, <Florian.Brucker at mb.karlsruhe.de> wrote:

> Dear Nathan,
>
> as far as I know the paster logs are not stored by default. However, you
> can configure that in your production.ini using Python's INI
> logging-configuration format (https://docs.python.org/2.7/
> library/logging.config.html#configuration-file-format). Here's how we
> have configured it:
>
>
> [loggers]
> keys = root, ckan, ckanext
>
> [handlers]
> keys = console,file
>
> [formatters]
> keys = generic
>
> [logger_root]
> level = WARNING
> handlers = console,file
>
> [logger_ckan]
> level = WARNING
> handlers = console,file
> qualname = ckan
> propagate = 0
>
> [logger_ckanext]
> level = WARNING
> handlers = console,file
> qualname = ckanext
> propagate = 0
>
> [handler_console]
> class = StreamHandler
> args = (sys.stderr,)
> level = NOTSET
> formatter = generic
>
> [handler_file]
> class = handlers.TimedRotatingFileHandler
> args = ('/var/log/ckan/default.log', 'W0', 1, 4)
> level = NOTSET
> formatter = generic
>
> [formatter_generic]
> format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s
>
>
> Note the "file" entry in the "handlers" variable of the [logger_*]
> sections and the configuration of it in the [handler_file] section
>
>
> Regards,
> Florian
>
>
>
> "ckan-dev" <ckan-dev-bounces at lists.okfn.org> schrieb am 10.11.2016
> 23:41:21:
>
> > Von: Nathan Hook <nhook at ucar.edu>
> > An: CKAN Development Discussions <ckan-dev at lists.okfn.org>,
> > Datum: 10.11.2016 23:41
> > Betreff: [ckan-dev] Log Output Location of paster serve Command
> > Gesendet von: "ckan-dev" <ckan-dev-bounces at lists.okfn.org>
> >
> > Hi Everyone,
> >
> > Does anyone know the default/standard location for logs to be
> > written when using the paster serve command to startup a ckan instance?
> >
> > We have been using apache with wsgi generally, but to simplify our
> > development environment we have by passed setting up apache and
> > wsgi, but now, we can't find any logging output.  :)
> >
> > So, any friendly direction on where to find those log files would be
> > greatly appreciated.
> >
> > Thank you for your time,
> >
> > Nathan_______________________________________________
> > ckan-dev mailing list
> > ckan-dev at lists.okfn.org
> > https://lists.okfn.org/mailman/listinfo/ckan-dev
> > Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20161121/22dd8ce7/attachment-0003.html>


More information about the ckan-dev mailing list