2025-07-21 01:22 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002674Spring engineGeneralpublic2011-09-26 19:56
Reporterabma 
Assigned Toabma 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0002674: add SetLogLevel(int minlevel); to unitsync api
Descriptionthis function can be called before Init(),
this would allow the caller to do what it want with log-messages...
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0007412

hoijui (reporter)

i think.. if we would have that, it should rather be a separate function, that could be called before init, and also any number of times after it, eventually.
-> more flexibility and no deprecation needed.

but...
i am not sure if it would be good like this at all. unitsync has to have a very clean API, as it may be used from many languages. having a callback function-pointer as argument does not exactly fit in there in my eyes.
maybe we could instead have one or a few functions that take arguments like:
* minLevel OR list<section, minLevel>
* logFile OR list<sections, logFile>
* bool useStdout, bool useStderr
* ...
(of course the lists would not be C++ list, i just used this syntax here for simplicity)

~0007416

abma (administrator)

Last edited: 2011-09-26 15:36

for the beginning a SetLogLevel(int minlevel); should be enough...

minlevel=-1 (or INT_MAX-1?) could disable logging completely.

~0007419

abma (administrator)

https://github.com/spring/spring/commit/f89666e6203cf3ce9952d1dc1144b608f7ca2665
+Notes

-Issue History
Date Modified Username Field Change
2011-09-26 01:19 abma New Issue
2011-09-26 09:47 hoijui Note Added: 0007412
2011-09-26 15:34 abma Note Added: 0007416
2011-09-26 15:35 abma Summary add init_with_log_callback(pointer to callback); to unitsync api => add SetLogLevel(int minlevel); to unitsync api
2011-09-26 15:35 abma Description Updated
2011-09-26 15:36 abma Note Edited: 0007416
2011-09-26 15:36 abma Note Edited: 0007416
2011-09-26 19:56 abma Note Added: 0007419
2011-09-26 19:56 abma Status new => resolved
2011-09-26 19:56 abma Resolution open => fixed
2011-09-26 19:56 abma Assigned To => abma
+Issue History