2 * Copyright (C) 2005-2008 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"
27 qs_log(Doc *doc, int log_level,const char *f, int l, char *msg)
34 FILE *fp = fopen("/tmp/debug.log", "a");
35 fprintf(fp, "DBG:[%20.20s][%10d]: - <%s>\n", f,l,msg);
45 FILE* fp = fopen("/tmp/debug.log", "a");
46 fprintf(fp, "INF:[%20.20s][%10d]: - <%s>\n", f,l,msg);
55 FILE *fp = fopen("/tmp/debug.log", "a");
56 fprintf(fp, "WRN:[%20.20s][%10d]: - <%s>\n", f,l,msg);
65 FILE *fp = fopen("/tmp/debug.log", "a");
66 fprintf(fp, "ERR:[%20.20s][%10d]: - <%s>\n", f,l,msg);
75 FILE *fp = fopen("/tmp/debug.log", "a");
76 fprintf(fp, "FTL:[%20.20s][%10d]: - <%s>\n", f,l,msg);
82 chxj_log_rerror(f,l, APLOG_CRIT, 0, doc->r, msg);
84 qs_all_free(doc, QX_LOGMARK);
90 qs_log_int(Doc *UNUSED(doc), int UNUSED(log_level),const char *UNUSED(f), int UNUSED(l), char *UNUSED(msg), int UNUSED(val))
97 fprintf(stderr, "DBG:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg, val);
102 fprintf(stderr, "INF:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);
106 fprintf(stderr, "WRN:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);
110 fprintf(stderr, "ERR:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);
114 fprintf(stderr, "FTL:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);