Commit 99add314 authored by Francis Dupont's avatar Francis Dupont
Browse files

[master] Merge branch 'trac3762'

parents 59d7801a e7c1e474
......@@ -25,7 +25,7 @@ extern const isc::log::MessageID LOG_PREFIX_EXTRA_ARGS = "LOG_PREFIX_EXTRA_ARGS"
extern const isc::log::MessageID LOG_PREFIX_INVALID_ARG = "LOG_PREFIX_INVALID_ARG";
extern const isc::log::MessageID LOG_READING_LOCAL_FILE = "LOG_READING_LOCAL_FILE";
extern const isc::log::MessageID LOG_READ_ERROR = "LOG_READ_ERROR";
extern const isc::log::MessageID LOG_UNRECOGNISED_DIRECTIVE = "LOG_UNRECOGNISED_DIRECTIVE";
extern const isc::log::MessageID LOG_UNRECOGNIZED_DIRECTIVE = "LOG_UNRECOGNIZED_DIRECTIVE";
extern const isc::log::MessageID LOG_WRITE_ERROR = "LOG_WRITE_ERROR";
} // namespace log
......@@ -52,7 +52,7 @@ const char* values[] = {
"LOG_PREFIX_INVALID_ARG", "line %1: $PREFIX directive has an invalid argument ('%2')",
"LOG_READING_LOCAL_FILE", "reading local message file %1",
"LOG_READ_ERROR", "error reading from message file %1: %2",
"LOG_UNRECOGNISED_DIRECTIVE", "line %1: unrecognised directive '%2'",
"LOG_UNRECOGNIZED_DIRECTIVE", "line %1: unrecogniszd directive '%2'",
"LOG_WRITE_ERROR", "error writing to %1: %2",
NULL
};
......
......@@ -26,7 +26,7 @@ extern const isc::log::MessageID LOG_PREFIX_EXTRA_ARGS;
extern const isc::log::MessageID LOG_PREFIX_INVALID_ARG;
extern const isc::log::MessageID LOG_READING_LOCAL_FILE;
extern const isc::log::MessageID LOG_READ_ERROR;
extern const isc::log::MessageID LOG_UNRECOGNISED_DIRECTIVE;
extern const isc::log::MessageID LOG_UNRECOGNIZED_DIRECTIVE;
extern const isc::log::MessageID LOG_WRITE_ERROR;
} // namespace log
......
# Copyright (C) 2011, 2014 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2011, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
......@@ -32,7 +32,7 @@ should be one of "DEBUG", "INFO", "WARN", "ERROR", "FATAL" or "NONE".
% LOG_BAD_STREAM bad log console output stream: %1
Logging has been configured so that output is written to the terminal
(console) but the stream on which it is to be written is not recognised.
(console) but the stream on which it is to be written is not recognized.
Allowed values are "stdout" and "stderr".
% LOG_DUPLICATE_MESSAGE_ID duplicate message ID (%1) in compiled code
......@@ -136,10 +136,10 @@ one or more messages; the ID of the message will not be changed though.)
% LOG_READ_ERROR error reading from message file %1: %2
The specified error was encountered reading from the named message file.
% LOG_UNRECOGNISED_DIRECTIVE line %1: unrecognised directive '%2'
% LOG_UNRECOGNIZED_DIRECTIVE line %1: unrecognized directive '%2'
Within a message file, a line starting with a dollar symbol was found
(indicating the presence of a directive) but the first word on the line
(shown in the message) was not recognised.
(shown in the message) was not recognized.
% LOG_WRITE_ERROR error writing to %1: %2
The specified error was encountered by the message compiler when writing
......
......@@ -203,9 +203,9 @@ An example file could be:
$NAMESPACE isc::log
% LOG_UNRECOGNISED_DIRECTIVE line %1: unrecognised directive '%2'
% LOG_UNRECOGNIZED_DIRECTIVE line %1: unrecognized directive '%2'
A line starting with a dollar symbol was found, but the first word on the line
(shown in the message) was not a recognised message compiler directive.
(shown in the message) was not a recognized message compiler directive.
% LOG_WRITE_ERROR error writing to %1: %2
The specified error was encountered by the message compiler when writing to
......@@ -224,7 +224,7 @@ be on a line by themselves; inline comments will be interpreted as part
of the text of that line.</li>
<li>Lines starting with "$" are directives. At present, just one
directive is recognised:
directive is recognized:
<dl>
<dt>$NAMESPACE &lt;namespace-name&gt;</dt>
<dd>The sole argument is the name of the namespace in which the
......
// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -115,9 +115,9 @@ MessageReader::parseDirective(const std::string& text) {
} else {
// Unrecognised directive
// Unrecognized directive
isc_throw_3(MessageException, "Unrecognized directive",
LOG_UNRECOGNISED_DIRECTIVE, tokens[0],
LOG_UNRECOGNIZED_DIRECTIVE, tokens[0],
lineno_);
}
}
......
// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -102,8 +102,8 @@ processLineException(MessageReader& reader, const char* what,
TEST_F(MessageReaderTest, InvalidDirectives) {
// Check that a "$" with nothing else generates an error
processLineException(reader_, "$", LOG_UNRECOGNISED_DIRECTIVE);
processLineException(reader_, "$xyz", LOG_UNRECOGNISED_DIRECTIVE);
processLineException(reader_, "$", LOG_UNRECOGNIZED_DIRECTIVE);
processLineException(reader_, "$xyz", LOG_UNRECOGNIZED_DIRECTIVE);
}
// Check that it can parse a prefix
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment