2 * Copyright (C) 2005 QSDN,Inc. All rights reserved.
3 * Copyright (C) 2005 Atsushi Konno 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"
24 extern apr_status_t chxj_init_module_kill(void *data);
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);
83 ap_log_rerror(f,l, APLOG_CRIT, 0, doc->r, msg);
84 chxj_init_module_kill((void*)doc->r->server);
86 qs_all_free(doc, QX_LOGMARK);
92 qs_log_int(Doc* doc, int log_level,const char* f, int l, char*msg, int val)
99 fprintf(stderr, "DBG:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg, val);
103 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);
109 fprintf(stderr, "ERR:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);
112 fprintf(stderr, "FTL:[%20.20s][%10d]: - <%s:%d>\n", f,l,msg,val);