Comments (13)
Issue was incorrect usage of log.error to log the stacktrace. log.exception should be used for printing stacktrace. Corrected in review: #125
from liota.
Okay. I would also suggest reviewing the multiple places where log.error is used in the liota codebase in case we require to change it to log.exception as it fixes the issue.
from liota.
traceback module is used only in this location.
from liota.
Issue occurs at multiple places in log files:
2017-05-18 19:27:54 PDT 5721 INFO [PackageThread] liota.core.package_manager.run(355) - Got message in package messenger queue: list pkg
2017-05-18 19:27:54 PDT 5721 WARNING [PackageThread] liota.core.package_manager._cmd_handler_list(257) - List of packages - __\n__
2017-05-18 19:28:18 PDT 5721 INFO [PackageThread] liota.core.package_manager.run(355) - Got message in package messenger queue: load edge_systems/dell5k/edge_system 626d4caddc37bb7958e5a491126733d2bc0f6aa3
2017-05-18 19:28:18 PDT 5721 INFO [PackageThread] liota.core.package_manager._package_load(567) - Loaded package file: /etc/liota/packages/edge_systems/dell5k/edge_system.py (626d4caddc37bb7958e5a491126733d2bc0f6aa3)
2017-05-18 19:28:18 PDT 5721 INFO [PackageThread] liota.lib.utilities.utility.get_uuid(108) - resource: EdgeSystem-Name uuid=113294af-1770-547d-9b80-0cbe3cae02e1
2017-05-18 19:28:18 PDT 5721 INFO [PackageThread] liota.core.package_manager._package_load(644) - Package class from module edge_systems/dell5k/edge_system is initialized
2017-05-18 19:28:32 PDT 5721 INFO [PackageThread] liota.core.package_manager.run(355) - Got message in package messenger queue: list pkg
2017-05-18 19:28:32 PDT 5721 WARNING [PackageThread] liota.core.package_manager._cmd_handler_list(257) - List of packages - __\n__ edge_systems/dell5k/edge_system
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(149) - endpoint_list:(disc_msg_pipe : /etc/liota/packages/dev_disc/discovery_messenger.fifo)__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(158) - type_key_map:(Press64 : serial)__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(158) - type_key_map:(LM35 : SN)__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(158) - type_key_map:(Banana23 : serial)__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(158) - type_key_map:(Apple56 : SN)__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(170) - type_dcc_map:(Press64 : ['iotcc_mqtt', 'iotcc'])__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(170) - type_dcc_map:(LM35 : ['graphite', 'iotcc_mqtt', 'iotcc'])__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(170) - type_dcc_map:(Banana23 : ['iotcc'])__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(170) - type_dcc_map:(Apple56 : ['iotcc_mqtt', 'iotcc'])__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(172) - type_tuple_key_dcc_pkg:(Press64 : ('serial', ['iotcc_mqtt', 'iotcc']))__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(172) - type_tuple_key_dcc_pkg:(LM35 : ('SN', ['graphite', 'iotcc_mqtt', 'iotcc']))__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(172) - type_tuple_key_dcc_pkg:(Banana23 : ('serial', ['iotcc']))__\n__
2017-05-19 00:18:26 UTC 1133 DEBUG [PackageThread] liota.core.device_discovery._get_config_from_file(172) - type_tuple_key_dcc_pkg:(Apple56 : ('SN', ['iotcc_mqtt', 'iotcc']))__\n__
from liota.
@pmasrani This issue exist in liota-0.3 beta release. Any progress on this issue?
from liota.
It is not a good practice to have multi-line logs, except for stack traces as those logs can't be parsed well by log parsers. It is up to individual module owner to make sure they add logs in good format, without using \n. Assigning to Winnie to take a look at package manager and device discovery logs.
from liota.
@winniex1 Can you please make sure that logs in Package Manager and Device discovery modules do not use \n.
from liota.
from liota.
@winniex1 & @bfrggit Can you please look into this issue?
from liota.
from liota.
@winniex1 Okay. I will change the package manager. Just change the output format to remove the newlines I guess?
from liota.
Okay. I will change the package manager. Just change the output format to remove the newlines I guess?
For the package manager stats -
I just mentioned this to @pmasrani. It seems that we do not want to simply change \n
to spaces since "stats are still unreadable" in that way.
@pmasrani proposed two potential fixes:
-
Output stats back to where the command is invoked. This requires some changes, since we may need a different pipe (or similar) to get those info back. The
liotapkg.sh
script also needs to be changed so it listens to that "different pipe" after command is written. -
Quicker fix: Create a different log file somewhere else, that contains package manager's logs, or perhaps just package manager's stat outputs. This requires changes in package manager only in Liota, but requires additional info in Liota config. Now we only have one Liota log file that contains everything. By doing this, we are starting different log files.
If this is not urgent before VMworld, we may want to discuss a little before I or anyone else actually make the changes.
from liota.
Any update on this issue as this needs to be fixed before we roll out latest release of Liota.
from liota.
Related Issues (20)
- Should it be enforced only one Liotad running on the EdgeSystem
- Syslog mechanism in Liota
- Developer Guide required for Liota
- Build Liota "SNAP" HOT 1
- Liotapkg.sh returns package manager not running inspite it is running
- Liota Package manager should handle independent packages loading in parallel
- Debian and RPM versions to be created for Liota
- Exit status should be non-negative value
- Check the possible approach to merge setup.py of Liota and Liota-lite
- /usr/lib/liota is not created with pip install HOT 3
- autostartliota script contains wrong liotad.py path HOT 1
- unset_property call to be designed in Liota
- Client certificate support MQTT provide examples
- Re-visit metric handler design
- Revisit sha1sum checksum mechanism for the dependent packages.
- 请问是否有中文版本示例与文档? HOT 5
- No module named 'pip.req' HOT 1
- Run liota on an esp8266/esp32 HOT 7
- Considerations on comparing to Apache MiNiFi and StreamSets's data collector edge
- Profinet example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liota.