Skip to content
Permalink
Browse files
8255859: Incorrect comments in log.hpp
Reviewed-by: kbarrett
  • Loading branch information
iklam committed Mar 2, 2021
1 parent c3eb80e commit 85b774af920a546447e5115a4a6f40d7a3305f4a
Showing with 11 additions and 13 deletions.
  1. +11 −13 src/hotspot/share/logging/log.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -72,16 +72,16 @@ class LogMessageBuffer;
// Log class for more advanced logging scenarios.
// Has printf-style member functions for each log level (trace(), debug(), etc).
//
// Also has outputStream compatible API for the different log-levels.
// The streams are resource allocated when requested and are accessed through
// calls to <level>_stream() functions (trace_stream(), debug_stream(), etc).
// The (trace(), debug(), etc) functions can also be used along with the LogStream
// class to obtain an outputStream object, to be passed to various printing
// functions that accept an outputStream:
//
// Example usage:
// Log(logging) log;
// Log(codecache, sweep) log;
// if (log.is_debug()) {
// ...
// log.debug("result = %d", result).trace(" tracing info");
// obj->print_on(log.debug_stream());
// LogStream ls(log.debug());
// CodeCache::print_summary(&ls, false);
// }
//
#define Log(...) LogImpl<LOG_TAGS(__VA_ARGS__)>
@@ -93,13 +93,11 @@ class LogMessageBuffer;
// so that redundant specification of tags or levels can be avoided.
//
// Example usage:
// LogTarget(Debug, gc) out;
// LogTarget(Debug, codecache, sweep) out;
// if (out.is_enabled()) {
// ...
// out.print("Worker: %u", i);
// out.print(" data: %d", x);
// ...
// print_stats(out.stream());
// out.print("result = %d", result);
// LogStream ls(out);
// CodeCache::print_summary(&ls, false);
// }
//
#define LogTarget(level, ...) LogTargetImpl<LogLevel::level, LOG_TAGS(__VA_ARGS__)>

1 comment on commit 85b774a

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 85b774a Mar 2, 2021

Please sign in to comment.