2 * Copyright (C) 2005-2011 Atsushi Konno All rights reserved.
3 * Copyright (C) 2005 QSDN,Inc. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 #include "qs_malloc.h"
21 #include "chxj_apache.h"
28 qs_log(Doc *doc, int log_level,const char *f, int l, char *msg)
35 FILE* fp = fopen("/tmp/debug.log", "a");
36 fprintf(fp, "DBG:[%20.20s][%10d]: - <%s>\n", f,l,msg);
46 FILE* fp = fopen("/tmp/debug.log", "a");
47 fprintf(fp, "INF:[%20.20s][%10d]: - <%s>\n", f,l,msg);
56 FILE* fp = fopen("/tmp/debug.log", "a");
57 fprintf(fp, "WRN:[%20.20s][%10d]: - <%s>\n", f,l,msg);
66 FILE* fp = fopen("/tmp/debug.log", "a");
67 fprintf(fp, "ERR:[%20.20s][%10d]: - <%s>\n", f,l,msg);
76 FILE* fp = fopen("/tmp/debug.log", "a");
77 fprintf(fp, "FTL:[%20.20s][%10d]: - <%s>\n", f,l,msg);
83 chxj_log_rerror(f,l, APLOG_CRIT, 0, doc->r, msg);
86 fprintf(stderr, "%s\n", msg);
92 qs_log_int(Doc *UNUSED(doc), int UNUSED(log_level),const char *UNUSED(f), int UNUSED(l), char *UNUSED(msg), int UNUSED(val))
99 fprintf(stderr, "DBG:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg, val);
104 fprintf(stderr, "INF:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);
108 fprintf(stderr, "WRN:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);
112 fprintf(stderr, "ERR:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);
116 fprintf(stderr, "FTL:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);