Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logger #885

Merged
merged 1 commit into from
Jul 19, 2020
Merged

Fix logger #885

merged 1 commit into from
Jul 19, 2020

Conversation

m-seker
Copy link
Contributor

@m-seker m-seker commented Jul 18, 2020

Summary
Fixes #723 and #874

Changes :

  • Make logger thread safe.
  • Include timestamp in logs.
  • Make logs look a bit more cleaner.

Example :

2020-07-18T23:10:08.975 hyperiond LEDDEVICE    : <DEBUG> ProviderSpi.cpp:46:init() | _baudRate_Hz [3000000], _latchTime_ms [0]
2020-07-18T23:10:08.975 hyperiond LEDDEVICE    : <DEBUG> ProviderSpi.cpp:47:init() | _spiDataInvert [0], _spiMode [0]
2020-07-18T23:10:08.975 hyperiond LEDDEVICE    : <DEBUG> LedDeviceSk6812SPI.cpp:45:init() | whiteAlgorithm : subtract_minimum
2020-07-18T23:10:08.975 hyperiond LEDDEVICE    : <ERROR> Device disabled, device 'sk6812spi' signals error: 'Failed to open device (/dev/spidev0.0). Error message: No such file or directory'
2020-07-18T23:10:08.981 hyperiond EFFECTENGINE : <INFO> Run effect "Rainbow swirl fast" on channel 0
2020-07-18T23:10:08.981 hyperiond EFFECTENGINE : <DEBUG> EffectEngine.cpp:187:runEffectScript() | Start the effect: name [Rainbow swirl fast], smoothCfg [2]
2020-07-18T23:10:08.981 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/EFFECT' with priority 0 as inactive
2020-07-18T23:10:08.981 hyperiond HYPERION     : <INFO> Initial foreground effect 'Rainbow swirl fast' started
2020-07-18T23:10:08.982 hyperiond EFFECTENGINE : <INFO> Run effect "Warm mood blobs" on channel 254
2020-07-18T23:10:08.982 hyperiond EFFECTENGINE : <DEBUG> EffectEngine.cpp:187:runEffectScript() | Start the effect: name [Warm mood blobs], smoothCfg [2]
2020-07-18T23:10:08.982 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/EFFECT' with priority 254 as inactive
2020-07-18T23:10:08.982 hyperiond HYPERION     : <INFO> Inital background effect 'Warm mood blobs' started
2020-07-18T23:10:08.982 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:158:registerInput() | Register new input 'System/GRABBER' with priority 250 as inactive
2020-07-18T23:10:08.982 hyperiond COMPONENTREG : <DEBUG> ComponentRegister.cpp:36:setNewComponentState() | Framegrabber: enabled
2020-07-18T23:10:08.982 hyperiond BOBLIGHT     : <DEBUG> BoblightServer.cpp:28:BoblightServer() | Instance created
2020-07-18T23:10:08.985 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:91:handleSettingsUpdate() | Apply Webserver settings
2020-07-18T23:10:08.985 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:109:handleSettingsUpdate() | Set document root to: :/webconfig
2020-07-18T23:10:08.986 hyperiond WEBSERVER    : <INFO> Started on port 8090 name 'Hyperion Webserver'
2020-07-18T23:10:08.986 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:91:handleSettingsUpdate() | Apply Webserver settings
2020-07-18T23:10:08.986 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:109:handleSettingsUpdate() | Set document root to: :/webconfig
2020-07-18T23:10:08.992 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:175:handleSettingsUpdate() | Setup SSL certificate
2020-07-18T23:10:08.993 hyperiond WEBSERVER    : <DEBUG> WebServer.cpp:191:handleSettingsUpdate() | Setup private SSL key
2020-07-18T23:10:08.993 hyperiond WEBSERVER    : <INFO> Started on port 8092 name 'Hyperion Webserver'
2020-07-18T23:10:09.073 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 0 is now active
2020-07-18T23:10:09.073 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 0
2020-07-18T23:10:09.087 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:198:setInput() | Priority 254 is now active
2020-07-18T23:10:09.141 hyperiond X11          : <DEBUG> GrabberWrapper.cpp:49:start() | Grabber start()
2020-07-18T23:10:09.141 hyperiond HYPERION     : <INFO> Hyperion instance 'First LED Hardware instance' has been started
2020-07-18T23:10:09.250 hyperiond X11GRABBER   : <INFO> Update of screen resolution: [0x0]  to [1920x1017]
2020-07-18T23:10:09.250 hyperiond X11GRABBER   : <INFO> Using XRender for grabbing
2020-07-18T23:10:09.250 hyperiond X11GRABBER   : <INFO> Update output image resolution: [0x0]  to [1920x1017]
2020-07-18T23:10:09.251 hyperiond X11GRABBER   : <INFO> Capture interface is now enabled
2020-07-18T23:10:09.321 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:238:setInputImage() | Priority 250 is now active
2020-07-18T23:10:12.138 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:298:setCurrentTime() | Timeout clear for priority 0
2020-07-18T23:10:12.390 hyperiond HYPERION     : <DEBUG> PriorityMuxer.cpp:333:setCurrentTime() | Set visible priority to 250

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing setups:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated (docs/docs/en)
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@hyperion-project
Copy link

Hello @m-seker 👋

I'm your friendly neighborhood bot and would like to say thank you for
submitting a pull request to Hyperion!

So that you and other users can test your changes more quickly,
you can find your workflow artifacts here.

If you make changes to your PR, i create a new link to your workflow artifacts.

Best regards,
Hyperion-Project

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@Paulchen-Panther
Copy link
Member

Do you still want to make changes?

@m-seker
Copy link
Contributor Author

m-seker commented Jul 19, 2020

@Paulchen-Panther nope, ready

@Paulchen-Panther Paulchen-Panther merged commit 4880e31 into hyperion-project:master Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log should contain timestamp
2 participants