CentOS 7.8 Test Log4j

[root@localhost ~]# cd /home/zwf
[root@localhost zwf]# ll
total 145396
-rw-------. 1 zwf  zwf    4804608 Feb 20 19:41 core.3460
drwxr-xr-x. 2 zwf  zwf          6 May  1  2020 Desktop
drwxr-xr-x. 2 zwf  zwf          6 May  1  2020 Documents
drwxr-xr-x. 2 zwf  zwf          6 May  1  2020 Downloads
-rwxrw-rw-. 1 root root 143722924 Mar  1 23:07 jdk-8u281-linux-x64.tar.gz
drwxr-xr-x. 2 zwf  zwf          6 May  1  2020 Music
drwxr-xr-x. 2 zwf  zwf          6 May  1  2020 Pictures
-rwxrw-rw-. 1 root root    355420 Mar  8 19:44 PrjTestLog.jar
drwxr-xr-x. 2 zwf  zwf          6 May  1  2020 Public
drwxr-xr-x. 2 zwf  zwf          6 May  1  2020 Templates
drwxr-xr-x. 2 zwf  zwf          6 May  1  2020 Videos
[root@localhost zwf]# java -jar PrjTestlog.jar
Error: Unable to access jarfile PrjTestlog.jar
[root@localhost zwf]# java -version
java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode)
[root@localhost zwf]# java -jar PrjTestLog.jar
-INFO-2021/03/10 09:28:29,760-Main.main(Main.java:10)-10-test elk logger.....zengwenfeng....info
-WARN-2021/03/10 09:28:29,775-Main.main(Main.java:12)-12-test elk logger.....zengwenfeng....warn
[root@localhost zwf]# 

猜你喜欢

转载自blog.csdn.net/spencer_tseng/article/details/114650868