Git Product home page Git Product logo

Comments (13)

pmasrani avatar pmasrani commented on July 28, 2024

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.

KohliDev avatar KohliDev commented on July 28, 2024

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.

pmasrani avatar pmasrani commented on July 28, 2024

traceback module is used only in this location.

from liota.

KohliDev avatar KohliDev commented on July 28, 2024

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.

KohliDev avatar KohliDev commented on July 28, 2024

@pmasrani This issue exist in liota-0.3 beta release. Any progress on this issue?

from liota.

pmasrani avatar pmasrani commented on July 28, 2024

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.

pmasrani avatar pmasrani commented on July 28, 2024

@winniex1 Can you please make sure that logs in Package Manager and Device discovery modules do not use \n.

from liota.

winniex1 avatar winniex1 commented on July 28, 2024

from liota.

KohliDev avatar KohliDev commented on July 28, 2024

@winniex1 & @bfrggit Can you please look into this issue?

from liota.

winniex1 avatar winniex1 commented on July 28, 2024

from liota.

bfrggit avatar bfrggit commented on July 28, 2024

@winniex1 Okay. I will change the package manager. Just change the output format to remove the newlines I guess?

from liota.

bfrggit avatar bfrggit commented on July 28, 2024

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:

  1. 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.

  2. 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.

KohliDev avatar KohliDev commented on July 28, 2024

Any update on this issue as this needs to be fixed before we roll out latest release of Liota.

from liota.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.