configfile_example.txt
来自「实现在电脑平台上控制短信modem或手机进行通讯的jar包和相关实例」· 文本 代码 · 共 36 行
TXT
36 行
# Here is a Configuration-file example, which can be used with the PropertyConfigurator :# Declare a appender variable named JDBClog4j.rootCategory=JDBC# JDBC is a class of JDBCAppender, which writes messages into a databaselog4j.appender.JDBC=JDBCAppender# 1. Database-options to connect to the databaselog4j.appender.JDBC.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=LENZI)(Port=1521))(ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=LENZI)(Port=1526)))(CONNECT_DATA=(SID=LENZI)))log4j.appender.JDBC.username=mex_pr_dev60log4j.appender.JDBC.password=mex_pr_dev60# 2. Connector-option to specify your own JDBCConnectionHandler#log4j.appender.JDBC.connector=MyConnectionHandler# 3. SQL-option to specify a static sql-statement which will be performed with every occuring message-event#log4j.appender.JDBC.sql=INSERT INTO LOGTEST (id, msg, created_on, created_by) VALUES (1, @MSG@, sysdate, 'me')# 4. Table-option to specify one table contained by the databaselog4j.appender.JDBC.table=logtest# 5. Columns-option to describe the important columns of the table (Not nullable columns are mandatory to describe!)log4j.appender.JDBC.columns=id_seq~EMPTY id~ID~MyIDHandler msg~MSG created_on~TIMESTAMP created_by~STATIC~Thomas Fenner (t.fenner@klopotek.de)# 6. Layout-options to define the layout of the messages (optional)#log4j.appender.JDBC.layout=org.apache.log4j.PatternLayout#log4j.appender.JDBC.layout.ConversionPattern=%m# 7. Buffer-option to define the size of the message-event-buffer (optional)#log4j.appender.JDBC.buffer=1# 8. Commit-option to define a auto-commitment (optional)#log4j.appender.JDBC.commit=Y
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?