jdbc - How is a Log4j2 JDBCAppender used to insert into a date column? -


i trying use log4j2's jdbcappender insert value oracle date column. know how use iseventtimestamp, need insert date threadcontext.

i'm guessing i'm not formatting date correctly, can't find documentation on how correctly format.

how i'm formatting date:

threadcontext.put("date_value", new date().tostring()); 

this log4j2 jdbcappender column element i'm using:

<column name="date_column" pattern="%x{date_value}" /> 

this error i'm getting:

2013-07-25 08:17:18,145 error failed insert record log event in manager [jdbcmanager{ description=xxxxxxxxx, buffersize=5, connectionsource=drivermanager{ url=jdbc:oracle:thin:@//xxxxxxxxx, username=xxxxxxxxx, passwordhash=xxxxxxxxx }, tablename=xxxxxxxxx, columns=[ { name=date_column, layout=%x{date_value}, literal=null, timestamp=false } ] }]. java.sql.sqldataexception: ora-01858: non-numeric character found numeric expected @ oracle.jdbc.driver.t4cttioer.processerror(t4cttioer.java:445) @ oracle.jdbc.driver.t4cttioer.processerror(t4cttioer.java:396) @ oracle.jdbc.driver.t4c8oall.processerror(t4c8oall.java:879) @ oracle.jdbc.driver.t4cttifun.receive(t4cttifun.java:450) 

any suggestions?


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -