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

Default logger configuration #12

Open
gonzalopd96 opened this issue Jun 8, 2021 · 1 comment
Open

Default logger configuration #12

gonzalopd96 opened this issue Jun 8, 2021 · 1 comment

Comments

@gonzalopd96
Copy link

Dear Rock-core developers:

Lately, the scripts that include loggers have started failing. We have seen that you have setted a default configuration of the tools-logger package, that, as you say in the .orogen, fails:

# Controls whether the logger should overwrite or timestamp an existing file, if it already exists.
# The default is to fail, but one of these flags is needed, if one wants to use safe temporary files as targets.
# The flags are mutually exclusive, therefore the task will fail if both are true.
property 'overwrite_existing_files', '/bool', false
property 'auto_timestamp_files', '/bool', false
attribute 'current_file', 'std/string'

Changing one of the above parameters ('overwrite_existing_files' or 'auto_timestamp_files') in this file to 'true' makes the logger work fine for us. Nevertheless, I'm afraid this is not a good solution, since we have diverged from your master branch, thus won't be able to pull future updates of this package. Is there a better procedure to keep this parameters tuned without diverging from you?

Thank you very much.

Best regards,
Gonzalo

@doudou
Copy link
Member

doudou commented Jun 8, 2021

Wait ... The default configuration does not always fail.... It fails if you try to start the logger with an existing filename, which would overwrite the old file.

I do apologize if we did change a behavior that you were relying on, especially since that was done without warning. In your case, you could set overwrite_existing_files to true to get back to where you were. You should be doing it in your scripts instead of within the orogen file to be able to update rock-core freely in the future.

However, I would strongly suggest changing your scripts to avoid losing log files, either by (simply) setting auto_timestamp_files to true or by generating a timestamped folder in which you store all of them (the strategy we adopted with Syskit)

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

No branches or pull requests

2 participants