Skip to content

Commit cda1bc3

Browse files
committed
update example
1 parent c1bb16f commit cda1bc3

1 file changed

Lines changed: 40 additions & 39 deletions

File tree

  • examples/src/main/java/group/rxcloud/capa/examples/telemetry
Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
1-
/*
2-
* Licensed to the Apache Software Foundation (ASF) under one or more
3-
* contributor license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright ownership.
5-
* The ASF licenses this file to You under the Apache License, Version 2.0
6-
* (the "License"); you may not use this file except in compliance with
7-
* the License. You may obtain a copy of the License at
8-
*
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
16-
*/
17-
package group.rxcloud.capa.examples.telemetry;
18-
19-
import lombok.extern.slf4j.Slf4j;
20-
21-
/**
22-
* An application cannot use log4j and logback configuration to print logs at the same time.
23-
* So if you want to test the log4j2 configuration to print logs, then you need to copy the resources/xml/log4j2.xml file to the resources directory, and then add log4j-slf4j-impl dependency to the pom file.
24-
* Else if you want to use logback configuration to print logs, then the resources/xml/logback.xml file needs to be copied to the resources path, and the logback-classic dependency needs to be added to the pom file.
25-
* Notice:
26-
* 1. Resources cannot contain log4j2.xml and logback.xml files at the same time,
27-
* 2. log4j-slf4j-impl and logback-classic cannot exist at the same time.
28-
*/
29-
@Slf4j
30-
public class DemoLog {
31-
32-
public static void main(String[] args) {
33-
try {
34-
log.info("test");
35-
}catch (Exception e){
36-
System.out.println();
37-
}
38-
}
39-
}
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package group.rxcloud.capa.examples.telemetry;
18+
19+
import lombok.extern.slf4j.Slf4j;
20+
21+
/**
22+
* An application cannot use log4j and logback configuration to print logs at the same time.
23+
* So if you want to test the log4j2 configuration to print logs, then you need to copy the resources/xml/log4j2.xml file to the resources directory, and then add log4j-slf4j-impl dependency to the pom file.
24+
* Else if you want to use logback configuration to print logs, then the resources/xml/logback.xml file needs to be copied to the resources path, and the logback-classic dependency needs to be added to the pom file.
25+
* Notice:
26+
* 1. Resources cannot contain log4j2.xml and logback.xml files at the same time,
27+
* 2. log4j-slf4j-impl and logback-classic cannot exist at the same time.
28+
*/
29+
@Slf4j
30+
public class DemoLog {
31+
32+
public static void main(String[] args) {
33+
try {
34+
log.info("test");
35+
}catch (Exception e){
36+
System.out.println();
37+
}
38+
39+
}
40+
}

0 commit comments

Comments
 (0)