Score:0

Replace datetime to unixtime on Apache error_log

cn flag

I'm need create a script replace datetime to unixtime on error_log apache files

error_log:

[Mon Nov 01 21:48:54 2021] [:error] AH00898: Error reading from remote server returned by xxxxxxxxxx, referer

I need change it to:

[1635803334] [:error] AH00898: Error reading from remote server returned by xxxxxxxxxx, referer

I've a script which change unixtime to datetime with perl (I use it with squid log), any change to inverse logic here?

#! /usr/bin/perl -p s/^\d+.\d+/localtime $&/e;

This script change timestamp ONLY and preserves anything else on stdout/file, I need something like this.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.