美文网首页SAPSAP 修行
Netweaver和CloudFoundry的log设置

Netweaver和CloudFoundry的log设置

作者: _扫地僧_ | 来源:发表于2020-03-01 14:51 被阅读0次

    Netweaver

    tcode SAAB,将Logpoints设置为"Log":

    给想打开trace的user创建一个activation:

    新建一个report:

    执行完report后返回SAAB即可查看到记录的log.


    CloudFoundry

    pom.xml里定义cf-logging, log4j2和slf4j这三个组件的版本号:

    <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>${slf4j.version}</version>
    </dependency>
    <dependency>
    <groupId>com.sap.hcp.cf.logging</groupId>
    <artifactId>cf-java-logging-support-log4j2</artifactId>
    <version>${cf-logging-version}</version>
    </dependency>
    
    <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-slf4j-impl</artifactId>
    <version>${log4j2.version}</version>
    </dependency>
    
    <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>${log4j2.version}</version>
    </dependency>
    
    <dependency>
    <groupId>com.sap.hcp.cf.logging</groupId>
    <artifactId>cf-java-logging-support-servlet</artifactId>
    <version>${cf-logging-version}</version>
    </dependency>
    

    代码里的使用:

    log记录成功:

    要获取更多Jerry的原创文章,请关注公众号"汪子熙":


    相关文章

      网友评论

        本文标题:Netweaver和CloudFoundry的log设置

        本文链接:https://www.haomeiwen.com/subject/afvphhtx.html