File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
src/main/java/com/epam/reportportal/example/testng/logback/logging Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2025 EPAM Systems
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package com .epam .reportportal .example .testng .logback .logging ;
18+
19+ import com .epam .reportportal .service .ReportPortal ;
20+ import org .testng .annotations .Test ;
21+
22+ import java .time .Instant ;
23+
24+ /**
25+ * The test logs a message with CUSTOM log level to ReportPortal.
26+ */
27+ public class CustomLogLevelTest {
28+
29+ @ Test
30+ public void logWithCustomLogLevel () {
31+ // Logback does not have custom Log Level, so we can use ReportPortal's emitter
32+ ReportPortal .emitLog ("Custom Log Level message" , "CUSTOM" , Instant .now ());
33+ }
34+ }
Original file line number Diff line number Diff line change 2222 </classes >
2323 </test >
2424
25+ <test name =" Custom Log Level" >
26+ <classes >
27+ <class name =" com.epam.reportportal.example.testng.logback.logging.CustomLogLevelTest" />
28+ </classes >
29+ </test >
30+
2531 <test verbose =" 1" name =" Different logging types" >
2632 <classes >
2733 <class name =" com.epam.reportportal.example.testng.logback.logging.LoggingTest" />
You can’t perform that action at this time.
0 commit comments