Lines Matching defs:newlog

272 static void post_rotate(apr_pool_t *pool, struct logfile *newlog,
282 apr_file_remove(config->linkfile, newlog->pool);
284 fprintf(stderr, "Linking %s to %s\n", newlog->name, config->linkfile);
286 rv = apr_file_link(newlog->name, config->linkfile);
289 newlog->name, config->linkfile, &rv);
324 argv[1] = newlog->name;
379 struct logfile newlog;
418 apr_strftime(newlog.name, &rs, sizeof(newlog.name), config->szLogRoot, &e);
422 apr_snprintf(newlog.name, sizeof(newlog.name), "%s", config->szLogRoot);
427 apr_snprintf(newlog.name, sizeof(newlog.name), "%s", config->szLogRoot);
431 apr_snprintf(newlog.name, sizeof(newlog.name), "%s.%d", config->szLogRoot, thisLogNum);
435 apr_snprintf(newlog.name, sizeof(newlog.name), "%s.%010ld", config->szLogRoot,
439 apr_pool_create(&newlog.pool, status->pool);
441 char *ptr = strrchr(newlog.name, '/');
442 if (ptr && ptr > newlog.name) {
443 char *path = apr_pstrmemdup(newlog.pool, newlog.name, ptr - newlog.name);
447 rv = apr_dir_make_recursive(path, APR_FPROT_OS_DEFAULT, newlog.pool);
449 char *error = apr_psprintf(newlog.pool,
458 fprintf(stderr, "Opening file %s\n", newlog.name);
460 rv = apr_file_open(&newlog.fd, newlog.name, APR_WRITE | APR_CREATE | APR_APPEND
462 APR_OS_DEFAULT, newlog.pool);
465 post_rotate(newlog.pool, &newlog, config, status);
474 status->current = newlog;
477 char *error = apr_psprintf(newlog.pool, "%pm", &rv);
484 fprintf(stderr, "Could not open log file '%s' (%s)\n", newlog.name, error);
490 message = apr_psprintf(newlog.pool,
498 apr_pool_destroy(newlog.pool);