-
Notifications
You must be signed in to change notification settings - Fork 172
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
Feature/log extension #192
Conversation
Signed-off-by: Juan Mesaglio <[email protected]>
Signed-off-by: Juan Mesaglio <[email protected]>
667ead0
to
4b7ba90
Compare
src/commons/log.c
Outdated
@@ -44,6 +44,11 @@ static bool _is_level_enabled(t_log* logger, t_log_level level); | |||
|
|||
|
|||
t_log* log_create(char* file, char *program_name, bool is_active_console, t_log_level detail) { | |||
if (!string_ends_with(file, ".log")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Abajo hay un chequeo de if (file != NULL)
, por lo que entendería que la API soporta pasarle un file
nulo y solo imprimir por consola.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisando eso, creo que lo mejor que podemos hacer es ahí apprendear el .log al final del nombre al momento de llamar a file_opened = txt_open_for_append(file);
y que les quede de ultima un archivo llamado kernel.log.log
, total les va a quedar una vez y a la segunda ya lo "arreglan"
dad0842
to
06fd126
Compare
Signed-off-by: Juan Mesaglio <[email protected]>
06fd126
to
d2c35a2
Compare
Ahi quedo el cambio con el comment de agus, de hacerlo solo cuando |
With this we can have less group logs in github
cc @RaniAgus @nahuemazzeo