[ 
https://issues.apache.org/jira/browse/GEODE-8250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17145929#comment-17145929
 ] 

ASF GitHub Bot commented on GEODE-8250:
---------------------------------------

jchen21 commented on a change in pull request #5309:
URL: https://github.com/apache/geode/pull/5309#discussion_r445898605



##########
File path: 
geode-assembly/src/acceptanceTest/java/org/apache/geode/logging/ServerWithCustomLogConfigAcceptanceTest.java
##########
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.logging;
+
+import static java.nio.file.Files.copy;
+import static org.apache.geode.test.assertj.LogFileAssert.assertThat;
+import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
+import static org.apache.geode.test.util.ResourceUtils.createFileFromResource;
+import static org.apache.geode.test.util.ResourceUtils.getResource;
+
+import java.nio.file.Path;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
+
+import org.apache.geode.test.junit.rules.gfsh.GfshRule;
+
+public class ServerWithCustomLogConfigAcceptanceTest {
+
+  private static final String CONFIG_WITH_GEODE_PLUGINS_FILE_NAME =
+      "ServerWithCustomLogConfigAcceptanceTestWithGeodePlugins.xml";
+  private static final String CONFIG_WITHOUT_GEODE_PLUGINS_FILE_NAME =
+      "ServerWithCustomLogConfigAcceptanceTestWithoutGeodePlugins.xml";
+
+  private String serverName;
+  private Path workingDir;
+  private Path configWithGeodePluginsFile;
+  private Path configWithoutGeodePluginsFile;
+  private Path serverLogFile;
+  private Path customLogFile;
+  private TemporaryFolder temporaryFolder;
+
+  @Rule
+  public GfshRule gfshRule = new GfshRule();
+  @Rule
+  public TestName testName = new TestName();
+
+  @Before
+  public void setUpLogConfigFiles() {
+    temporaryFolder = gfshRule.getTemporaryFolder();
+
+    configWithGeodePluginsFile = createFileFromResource(
+        getResource(CONFIG_WITH_GEODE_PLUGINS_FILE_NAME), 
temporaryFolder.getRoot(),
+        CONFIG_WITH_GEODE_PLUGINS_FILE_NAME)
+            .toPath();
+
+    configWithoutGeodePluginsFile = createFileFromResource(
+        getResource(CONFIG_WITHOUT_GEODE_PLUGINS_FILE_NAME), 
temporaryFolder.getRoot(),
+        CONFIG_WITHOUT_GEODE_PLUGINS_FILE_NAME)
+            .toPath();
+  }
+
+  @Before
+  public void setUpOutputFiles() {
+    temporaryFolder = gfshRule.getTemporaryFolder();
+
+    serverName = testName.getMethodName();
+
+    workingDir = temporaryFolder.getRoot().toPath().toAbsolutePath();
+    serverLogFile = workingDir.resolve(serverName + ".log");
+    customLogFile = workingDir.resolve("custom.log");
+  }
+
+  @Test
+  public void serverLauncherUsesDefaultLoggingConfig() {
+    String startLocatorCommand = String.join(" ",

Review comment:
       `startServerCommand`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Improve documentation for logging
> ---------------------------------
>
>                 Key: GEODE-8250
>                 URL: https://issues.apache.org/jira/browse/GEODE-8250
>             Project: Geode
>          Issue Type: Improvement
>          Components: docs
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>            Priority: Major
>              Labels: GeodeOperationAPI, docs, logging
>             Fix For: 1.14.0
>
>
> The documentation pages for logging need some fixes, clarification, and 
> examples. Specifically the docs need updating to cover the newer geode-log4j 
> module and its custom appenders. Examples should include how to use custom 
> logging config with optional usage of the latest version of Geode's custom 
> appenders and pattern converters.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to