add some logging #17

Merged
Solvik merged 9 commits from feature/logging into master 2019-08-07 15:38:21 +02:00
Solvik commented 2019-08-06 18:00:12 +02:00 (Migrated from github.com)

Fixes issue #18

Fixes issue #18
ramnes (Migrated from github.com) reviewed 2019-08-07 01:49:57 +02:00
ramnes (Migrated from github.com) commented 2019-08-07 01:49:56 +02:00

This should be configurable with the CLI arguments

This should be configurable with the CLI arguments
ramnes (Migrated from github.com) reviewed 2019-08-07 01:56:32 +02:00
ramnes (Migrated from github.com) commented 2019-08-07 01:56:32 +02:00

If you don't plan to have much things use netbox_agent as a library, I'd try to modify the root logger directly so that you can use the root functions of logging and not care to remember where is the logger you should import, i.e. do import logging; logging.debug(...) rather than from netbox_agent.logging import logger; logger.debug(...).

If you don't plan to have much things use netbox_agent as a library, I'd try to modify the root logger directly so that you can use the root functions of `logging` and not care to remember where is the logger you should import, i.e. do `import logging; logging.debug(...)` rather than `from netbox_agent.logging import logger; logger.debug(...)`.
ramnes (Migrated from github.com) reviewed 2019-08-07 02:06:07 +02:00
ramnes (Migrated from github.com) commented 2019-08-07 02:06:06 +02:00

Do we really need this? It seems to me that it makes sense for daemons but not much here, and I'm not sure of what would happen on a read-only filesystem or other weird scenarios.

Do we really need this? It seems to me that it makes sense for daemons but not much here, and I'm not sure of what would happen on a read-only filesystem or other weird scenarios.
ramnes (Migrated from github.com) reviewed 2019-08-07 02:08:42 +02:00
ramnes (Migrated from github.com) commented 2019-08-07 02:08:41 +02:00
                                'Detected interface change: old interface is {old_interface} '
```suggestion 'Detected interface change: old interface is {old_interface} ' ```
ramnes (Migrated from github.com) reviewed 2019-08-07 02:11:20 +02:00
ramnes (Migrated from github.com) commented 2019-08-07 02:11:19 +02:00
        logger.info('Creating NIC...')

Also, I feel this should be of DEBUG level; you should only keep the most vital information as INFO.

```suggestion logger.info('Creating NIC...') ``` Also, I feel this should be of DEBUG level; you should only keep the most vital information as INFO.
Solvik (Migrated from github.com) reviewed 2019-08-07 10:35:30 +02:00
Solvik (Migrated from github.com) commented 2019-08-07 10:35:30 +02:00

I've simplified everything

I've simplified everything
Solvik (Migrated from github.com) reviewed 2019-08-07 10:35:49 +02:00
Solvik (Migrated from github.com) commented 2019-08-07 10:35:48 +02:00

done :) thanks!

done :) thanks!
Solvik (Migrated from github.com) reviewed 2019-08-07 10:35:57 +02:00
Solvik (Migrated from github.com) commented 2019-08-07 10:35:57 +02:00

implemented!

implemented!
Sign in to join this conversation.
No description provided.