You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jacob Kjome <ho...@visi.com> on 2006/02/14 18:43:20 UTC

chainsaw timestampFormat and relative dates


We have a log4j configuration with a file appender having the conversion
pattern....

%-14d{ISO8601} %-5p %c{3} - %m%n

This results in lines such as...

13/02 14:05:06 DEBUG ui.actions.MyAction - Some message


My chainsaw config has the following for timestampFormat...

dd/MM HH:mm:ss

This works, as it matches the timestamp provided by the ISO8601 date (at least
chainsaw seems to accept it as valid).  However, it results in the year being
displayed as 1970.

So, how do I get this to to assume that the unstated year is the current year,
not 1970?

Also, unrelated, what version of JSCH do you use when using the sftp:// protocol
via VFS?  I've now been able to connect via ftp:// using my username/password,
but not via SFTP.  I've verified that I can connect via SFTP using FileZilla. 
Just wondering if you had any insight?  I've also tried this outside of
Chainsaw (using the <vfs:copy> Ant task) and get the same result.  Then again,
I'm using the same versions of VFS and JSCH there as I do in Chainsaw.  Just
wondering if there is a magic combination of versions that works?  Otherwise, I
guess I'll take this question to the commons list.

later,

Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: chainsaw timestampFormat and relative dates

Posted by Paul Smith <ps...@aconex.com>.
Jake, I'm not 100% sure if this is relevant, but I could not get the  
SCP ant task to work (which uses JSch) without using certificate  
authentication (see the build.xml in the chainsaw tree, in the  
distribution target, it copies the distribution over scp).

If you set up SSH key authentication between your local host and the  
remote machine such that no password is required (or only the  
password for your local key), then it should work great.

This URL may be helpful:

http://www.jfitz.com/tips/ssh_for_windows.html#Automatic_login

(and the rest of the article)

Once you can SSH from your local machine to the remote machine via  
this mechanism I'm guessing that the SFTP under Chainsaw will also  
work more smoothly.

Paul
On 15/02/2006, at 4:43 AM, Jacob Kjome wrote:

>
>
> We have a log4j configuration with a file appender having the  
> conversion
> pattern....
>
> %-14d{ISO8601} %-5p %c{3} - %m%n
>
> This results in lines such as...
>
> 13/02 14:05:06 DEBUG ui.actions.MyAction - Some message
>
>
> My chainsaw config has the following for timestampFormat...
>
> dd/MM HH:mm:ss
>
> This works, as it matches the timestamp provided by the ISO8601  
> date (at least
> chainsaw seems to accept it as valid).  However, it results in the  
> year being
> displayed as 1970.
>
> So, how do I get this to to assume that the unstated year is the  
> current year,
> not 1970?
>
> Also, unrelated, what version of JSCH do you use when using the  
> sftp:// protocol
> via VFS?  I've now been able to connect via ftp:// using my  
> username/password,
> but not via SFTP.  I've verified that I can connect via SFTP using  
> FileZilla.
> Just wondering if you had any insight?  I've also tried this  
> outside of
> Chainsaw (using the <vfs:copy> Ant task) and get the same result.   
> Then again,
> I'm using the same versions of VFS and JSCH there as I do in  
> Chainsaw.  Just
> wondering if there is a magic combination of versions that works?   
> Otherwise, I
> guess I'll take this question to the commons list.
>
> later,
>
> Jake
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: chainsaw timestampFormat and relative dates

Posted by Jacob Kjome <ho...@visi.com>.
Ok, I should have verified first.  I found out that the config file is
specifying a custom date format.  Our official config file has the ISO8601
format, but that hadn't been put in place on the appserver.  I was just
assuming that the ISO8601 format was what I was seeing.  Whoops.  I thought
that would be odd for an ISO format.  I suppose there probably isn't a way to
specify a relative date where the year is assumed to be the current year and
not 1970.  If I'm wrong, someone please speak up.  Otherwise, I don't think it
will be an issue for me any longer anyway.

I still am wondering about the SFTP stuff I mentioned, so if anyone has anything
to say about that, it would be appreciated.

Jake

Quoting Jacob Kjome <ho...@visi.com>:

>
>
> We have a log4j configuration with a file appender having the conversion
> pattern....
>
> %-14d{ISO8601} %-5p %c{3} - %m%n
>
> This results in lines such as...
>
> 13/02 14:05:06 DEBUG ui.actions.MyAction - Some message
>
>
> My chainsaw config has the following for timestampFormat...
>
> dd/MM HH:mm:ss
>
> This works, as it matches the timestamp provided by the ISO8601 date (at
> least
> chainsaw seems to accept it as valid).  However, it results in the year being
> displayed as 1970.
>
> So, how do I get this to to assume that the unstated year is the current
> year,
> not 1970?
>
> Also, unrelated, what version of JSCH do you use when using the sftp://
> protocol
> via VFS?  I've now been able to connect via ftp:// using my
> username/password,
> but not via SFTP.  I've verified that I can connect via SFTP using FileZilla.
> Just wondering if you had any insight?  I've also tried this outside of
> Chainsaw (using the <vfs:copy> Ant task) and get the same result.  Then
> again,
> I'm using the same versions of VFS and JSCH there as I do in Chainsaw.  Just
> wondering if there is a magic combination of versions that works?  Otherwise,
> I
> guess I'll take this question to the commons list.
>
> later,
>
> Jake
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org