Mark Geary.Logging log calls as printf-format, fix the resulting issues.
This commit is contained in:
parent
c371b91340
commit
6097b0a78f
4 changed files with 21 additions and 8 deletions
|
|
@ -89,26 +89,31 @@ public inline bool are_all_flags_set(Flag flags) {
|
||||||
return logging_flags.is_all_set(flags);
|
return logging_flags.is_all_set(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[PrintfFormat]
|
||||||
public inline void error(Flag flags, string fmt, ...) {
|
public inline void error(Flag flags, string fmt, ...) {
|
||||||
if (logging_flags.is_any_set(flags))
|
if (logging_flags.is_any_set(flags))
|
||||||
logv(DOMAIN, LogLevelFlags.LEVEL_ERROR, fmt, va_list());
|
logv(DOMAIN, LogLevelFlags.LEVEL_ERROR, fmt, va_list());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[PrintfFormat]
|
||||||
public inline void critical(Flag flags, string fmt, ...) {
|
public inline void critical(Flag flags, string fmt, ...) {
|
||||||
if (logging_flags.is_any_set(flags))
|
if (logging_flags.is_any_set(flags))
|
||||||
logv(DOMAIN, LogLevelFlags.LEVEL_CRITICAL, fmt, va_list());
|
logv(DOMAIN, LogLevelFlags.LEVEL_CRITICAL, fmt, va_list());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[PrintfFormat]
|
||||||
public inline void warning(Flag flags, string fmt, ...) {
|
public inline void warning(Flag flags, string fmt, ...) {
|
||||||
if (logging_flags.is_any_set(flags))
|
if (logging_flags.is_any_set(flags))
|
||||||
logv(DOMAIN, LogLevelFlags.LEVEL_WARNING, fmt, va_list());
|
logv(DOMAIN, LogLevelFlags.LEVEL_WARNING, fmt, va_list());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[PrintfFormat]
|
||||||
public inline void message(Flag flags, string fmt, ...) {
|
public inline void message(Flag flags, string fmt, ...) {
|
||||||
if (logging_flags.is_any_set(flags))
|
if (logging_flags.is_any_set(flags))
|
||||||
logv(DOMAIN, LogLevelFlags.LEVEL_MESSAGE, fmt, va_list());
|
logv(DOMAIN, LogLevelFlags.LEVEL_MESSAGE, fmt, va_list());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[PrintfFormat]
|
||||||
public inline void debug(Flag flags, string fmt, ...) {
|
public inline void debug(Flag flags, string fmt, ...) {
|
||||||
if (logging_flags.is_any_set(flags)) {
|
if (logging_flags.is_any_set(flags)) {
|
||||||
logv(DOMAIN, LogLevelFlags.LEVEL_DEBUG, fmt, va_list());
|
logv(DOMAIN, LogLevelFlags.LEVEL_DEBUG, fmt, va_list());
|
||||||
|
|
|
||||||
|
|
@ -64,12 +64,16 @@ private class Geary.ImapEngine.ReplayQueue : Geary.BaseObject {
|
||||||
private Scheduler.Scheduled? notification_timer = null;
|
private Scheduler.Scheduled? notification_timer = null;
|
||||||
private int64 next_submission_number = 0;
|
private int64 next_submission_number = 0;
|
||||||
private State state = State.OPEN;
|
private State state = State.OPEN;
|
||||||
|
|
||||||
public virtual signal void scheduled(ReplayOperation op) {
|
public virtual signal void scheduled(ReplayOperation op) {
|
||||||
Logging.debug(Logging.Flag.REPLAY, "[%s] ReplayQueue::scheduled: %s %s", to_string(),
|
Logging.debug(
|
||||||
op.to_string());
|
Logging.Flag.REPLAY,
|
||||||
|
"[%s] ReplayQueue::scheduled: %s",
|
||||||
|
to_string(),
|
||||||
|
op.to_string()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual signal void locally_executing(ReplayOperation op) {
|
public virtual signal void locally_executing(ReplayOperation op) {
|
||||||
Logging.debug(Logging.Flag.REPLAY, "[%s] ReplayQueue::locally-executing: %s", to_string(),
|
Logging.debug(Logging.Flag.REPLAY, "[%s] ReplayQueue::locally-executing: %s", to_string(),
|
||||||
op.to_string());
|
op.to_string());
|
||||||
|
|
|
||||||
|
|
@ -484,7 +484,11 @@ public class Geary.Imap.Deserializer : BaseObject {
|
||||||
private void flush_params() {
|
private void flush_params() {
|
||||||
bool okay = true;
|
bool okay = true;
|
||||||
if (this.context != this.root) {
|
if (this.context != this.root) {
|
||||||
Logging.debug(Logging.Flag.DESERIALIZER, "[%s] Unclosed list in parameters");
|
Logging.debug(
|
||||||
|
Logging.Flag.DESERIALIZER,
|
||||||
|
"[%s] Unclosed list in parameters",
|
||||||
|
to_string()
|
||||||
|
);
|
||||||
okay = false;
|
okay = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,9 +118,9 @@ public class Geary.Smtp.ClientConnection {
|
||||||
Response response = yield transaction_async(new Request(Command.DATA), cancellable);
|
Response response = yield transaction_async(new Request(Command.DATA), cancellable);
|
||||||
if (!response.code.is_start_data())
|
if (!response.code.is_start_data())
|
||||||
return response;
|
return response;
|
||||||
|
|
||||||
Logging.debug(Logging.Flag.NETWORK, "[%s] SMTP Data: <%ldb>", to_string(), data.size);
|
Logging.debug(Logging.Flag.NETWORK, "[%s] SMTP Data: <%z>", to_string(), data.size);
|
||||||
|
|
||||||
if (!already_dotstuffed) {
|
if (!already_dotstuffed) {
|
||||||
// By using DataStreamNewlineType.ANY, we're assured to get each line and convert to
|
// By using DataStreamNewlineType.ANY, we're assured to get each line and convert to
|
||||||
// a proper line terminator for SMTP
|
// a proper line terminator for SMTP
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue