Don't log non-enabled levels from Geary.Logging.Source
We want to do this in the future, but only when we have better means of selecting which log messages to display or not.
This commit is contained in:
parent
24a0ad70ae
commit
d949a8e500
1 changed files with 9 additions and 7 deletions
|
|
@ -217,14 +217,16 @@ public interface Geary.Logging.Source : GLib.Object {
|
|||
GLib.LogLevelFlags levels,
|
||||
string fmt,
|
||||
va_list args) {
|
||||
Context context = Context(Logging.DOMAIN, flags, levels, fmt, args);
|
||||
Source? decorated = this;
|
||||
while (decorated != null) {
|
||||
context.append_source(decorated);
|
||||
decorated = decorated.logging_parent;
|
||||
}
|
||||
if (flags == ALL || Logging.get_flags().is_any_set(flags)) {
|
||||
Context context = Context(Logging.DOMAIN, flags, levels, fmt, args);
|
||||
Source? decorated = this;
|
||||
while (decorated != null) {
|
||||
context.append_source(decorated);
|
||||
decorated = decorated.logging_parent;
|
||||
}
|
||||
|
||||
GLib.log_structured_array(levels, context.to_array());
|
||||
GLib.log_structured_array(levels, context.to_array());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue