Mastering JBoss Enterprise Application Platform 7 by Francesco Marchioni & Luigi Fugaro
Author:Francesco Marchioni & Luigi Fugaro [Marchioni, Francesco]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2016-08-31T04:00:00+00:00
Reading logs with management interfaces
Log files can also be read or downloaded with the management interfaces of the application server. This is quite useful if you don't have an operating system account for inspecting your log files.
You have multiple options for reading logs with management interfaces. We will show at first how to do it with the CLI; next, we will use the REST services of the administration console to read it from a common browser.
Reading logs from the CLI
The logging subsystem includes a log-file resource that can be used to read the list of log files that have been created:
/subsystem=logging:read-children-names(child-type=log-file) { "outcome" => "success", "result" => [ "server.log", "server.log.2015-02-12", "server.log.2015-02-13" ] }
If you want to inspect a single log file, then you can use the read-log-file operation which is available on each log-file resource:
/subsystem=logging/log-file=server.log:read-log-file { "outcome" => "success", "result" => [ "2016-02-08 12:09:50,386 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 58) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.", "2016-02-08 12:09:51,004 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 62) WFLYCLINF0002: Started routing cache from web container", "2016-02-08 12:09:51,398 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 58) WFLYUT0021: Registered web context: /web", "2016-02-08 12:09:51,453 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "web.war" (runtime-name : "web.war")", "2016-02-08 12:09:51,585 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management", "2016-02-08 12:09:51,586 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990", "2016-02-08 12:09:51,587 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: EAP 7.0.0.Beta1 (WildFly Core 2.0.3.Final-redhat-1) started in 6393ms - Started 373 of 601 services (354 services are lazy, passive or on-demand)" ] }
The read-log-file operation accepts the following parameters:
encoding: The encoding the file should be read in.
lines: The number of lines from the file. A value of -1 indicates all lines should be read.
skip: The number of lines to skip before reading.
tail: True to read from the end of the file up or false to read from the top down.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7425)
Supercharging Productivity with Trello by Brittany Joiner(6687)
Mastering Tableau 2023 - Fourth Edition by Marleen Meier(6451)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6426)
Inkscape by Example by István Szép(6303)
Visualize Complex Processes with Microsoft Visio by David J Parker & Šenaj Lelić(5998)
Build Stunning Real-time VFX with Unreal Engine 5 by Hrishikesh Andurlekar(5001)
Design Made Easy with Inkscape by Christopher Rogers(4648)
Customizing Microsoft Teams by Gopi Kondameda(4187)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3941)
Business Intelligence Career Master Plan by Eduardo Chavez & Danny Moncada(3788)
Extending Microsoft Power Apps with Power Apps Component Framework by Danish Naglekar(3774)
Salesforce Platform Enterprise Architecture - Fourth Edition by Andrew Fawcett(3653)
Pandas Cookbook by Theodore Petrou(3629)
The Tableau Workshop by Sumit Gupta Sylvester Pinto Shweta Sankhe-Savale JC Gillet and Kenneth Michael Cherven(3428)
TCP IP by Todd Lammle(2995)
Drawing Shortcuts: Developing Quick Drawing Skills Using Today's Technology by Leggitt Jim(2925)
Exploring Microsoft Excel's Hidden Treasures by David Ringstrom(2898)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2885)
