ObjFW  Diff

Differences From Artifact [00f92e27f7]:

To Artifact [719e5e7862]:


105
106
107
108
109
110
111

112

113
114

115

116
117
118
119
120
121
122
123


124
125
126
127
128
129
130
105
106
107
108
109
110
111
112

113
114
115
116

117
118
119
120
121
122
123
124

125
126
127
128
129
130
131
132
133







+
-
+


+
-
+







-
+
+







	return -1;
}

void
of_log(OFConstantString *fmt, ...)
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFDate *date;
	OFString *date, *me, *msg;
	OFString *date_str, *me, *msg;
	va_list args;

	date = [OFDate date];
	date = [[OFDate date] localDateStringWithFormat: @"%Y-%m-%dT%H:%M:%S"];
	date_str = [date localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"];
	me = [OFFile lastComponentOfPath: [OFApplication programName]];

	va_start(args, fmt);
	msg = [[[OFString alloc] initWithFormat: fmt
				      arguments: args] autorelease];
	va_end(args);

	[of_stderr writeFormat: @"[%@ %@(%d)] %@\n", date, me, getpid(), msg];
	[of_stderr writeFormat: @"[%@.%03d %@(%d)] %@\n", date_str,
				[date microsecond] / 1000, me, getpid(), msg];

	[pool release];
}

@interface OFFileSingleton: OFFile
@end