12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24 #include "precompiled.hpp"
25 #include "jvm.h"
26 #include "logging/log.hpp"
27 #include "logging/logFileStreamOutput.hpp"
28 #include "logging/logOutput.hpp"
29 #include "logging/logSelection.hpp"
30 #include "logging/logTagSet.hpp"
31 #include "memory/allocation.inline.hpp"
32 #include "runtime/mutexLocker.hpp"
33 #include "runtime/os.inline.hpp"
34
35 LogOutput::~LogOutput() {
36 os::free(_config_string);
37 }
38
39 void LogOutput::describe(outputStream *out) {
40 out->print("%s ", name());
41 out->print_raw(config_string()); // raw printed because length might exceed O_BUFLEN
42
43 bool has_decorator = false;
44 char delimiter = ' ';
45 for (size_t d = 0; d < LogDecorators::Count; d++) {
46 LogDecorators::Decorator decorator = static_cast<LogDecorators::Decorator>(d);
47 if (decorators().is_decorator(decorator)) {
48 has_decorator = true;
49 out->print("%c%s", delimiter, LogDecorators::name(decorator));
50 delimiter = ',';
51 }
52 }
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24 #include "precompiled.hpp"
25 #include "jvm.h"
26 #include "logging/log.hpp"
27 #include "logging/logFileStreamOutput.hpp"
28 #include "logging/logOutput.hpp"
29 #include "logging/logSelection.hpp"
30 #include "logging/logTagSet.hpp"
31 #include "memory/allocation.inline.hpp"
32 #include "runtime/mutexLocker.inline.hpp"
33 #include "runtime/os.inline.hpp"
34
35 LogOutput::~LogOutput() {
36 os::free(_config_string);
37 }
38
39 void LogOutput::describe(outputStream *out) {
40 out->print("%s ", name());
41 out->print_raw(config_string()); // raw printed because length might exceed O_BUFLEN
42
43 bool has_decorator = false;
44 char delimiter = ' ';
45 for (size_t d = 0; d < LogDecorators::Count; d++) {
46 LogDecorators::Decorator decorator = static_cast<LogDecorators::Decorator>(d);
47 if (decorators().is_decorator(decorator)) {
48 has_decorator = true;
49 out->print("%c%s", delimiter, LogDecorators::name(decorator));
50 delimiter = ',';
51 }
52 }
|