Changeset 6c8c5259c6ac9ddc2ccfe9c2409a72a743af6099
- Timestamp:
- 08/12/11 03:28:29
(2 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1313119709 -0400
- git-parent:
[b394de2213c1f29eca92242b6fa60df439236740]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1313119709 -0400
- Message:
leverage the jlog error func as it is more descriptive.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rc3852a0 |
r6c8c525 |
|
| 436 | 436 | return 0; |
|---|
| 437 | 437 | } |
|---|
| | 438 | static void |
|---|
| | 439 | noit_log_jlog_err(void *ctx, const char *format, ...) { |
|---|
| | 440 | int rv; |
|---|
| | 441 | struct timeval now; |
|---|
| | 442 | va_list arg; |
|---|
| | 443 | va_start(arg, format); |
|---|
| | 444 | gettimeofday(&now, NULL); |
|---|
| | 445 | rv = noit_vlog(noit_error, &now, "jlog.c", 0, format, arg); |
|---|
| | 446 | va_end(arg); |
|---|
| | 447 | } |
|---|
| 438 | 448 | static int |
|---|
| 439 | 449 | jlog_logio_open(noit_log_stream_t ls) { |
|---|
| … | … | |
| 447 | 457 | log = jlog_new(path); |
|---|
| 448 | 458 | if(!log) return -1; |
|---|
| | 459 | jlog_set_error_func(log, noit_log_jlog_err, ls); |
|---|
| 449 | 460 | /* Open the writer. */ |
|---|
| 450 | 461 | if(jlog_ctx_open_writer(log)) { |
|---|
| … | … | |
| 454 | 465 | jlog_ctx_close(log); |
|---|
| 455 | 466 | log = jlog_new(path); |
|---|
| | 467 | jlog_set_error_func(log, noit_log_jlog_err, ls); |
|---|
| 456 | 468 | if(jlog_ctx_init(log)) { |
|---|
| 457 | 469 | noitL(noit_error, "Cannot init jlog writer: %s\n", |
|---|
| … | … | |
| 463 | 475 | jlog_ctx_close(log); |
|---|
| 464 | 476 | log = jlog_new(path); |
|---|
| | 477 | jlog_set_error_func(log, noit_log_jlog_err, ls); |
|---|
| 465 | 478 | if(jlog_ctx_open_writer(log)) { |
|---|
| 466 | 479 | noitL(noit_error, "Cannot open jlog writer: %s\n", |
|---|