|
Packit Service |
3470d1 |
/* BEGIN_ICS_COPYRIGHT7 ****************************************
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
Copyright (c) 2015, Intel Corporation
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
Redistribution and use in source and binary forms, with or without
|
|
Packit Service |
3470d1 |
modification, are permitted provided that the following conditions are met:
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
* Redistributions of source code must retain the above copyright notice,
|
|
Packit Service |
3470d1 |
this list of conditions and the following disclaimer.
|
|
Packit Service |
3470d1 |
* Redistributions in binary form must reproduce the above copyright
|
|
Packit Service |
3470d1 |
notice, this list of conditions and the following disclaimer in the
|
|
Packit Service |
3470d1 |
documentation and/or other materials provided with the distribution.
|
|
Packit Service |
3470d1 |
* Neither the name of Intel Corporation nor the names of its contributors
|
|
Packit Service |
3470d1 |
may be used to endorse or promote products derived from this software
|
|
Packit Service |
3470d1 |
without specific prior written permission.
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Packit Service |
3470d1 |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit Service |
3470d1 |
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Packit Service |
3470d1 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
Packit Service |
3470d1 |
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit Service |
3470d1 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Packit Service |
3470d1 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Packit Service |
3470d1 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Packit Service |
3470d1 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit Service |
3470d1 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
** END_ICS_COPYRIGHT7 ****************************************/
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
/* [ICS VERSION STRING: unknown] */
|
|
Packit Service |
3470d1 |
/*!
|
|
Packit Service |
3470d1 |
@file Log/Log_Messages.c
|
|
Packit Service |
3470d1 |
@brief Nationalizable Strings and Messages for Log Package generated from Log.msg
|
|
Packit Service |
3470d1 |
*/
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
#include "Log_Messages.h"
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
/*!
|
|
Packit Service |
3470d1 |
Module specific message table, referenced by Log_MessageId_t.
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
The entries in the table must provide equivalent argument usage for
|
|
Packit Service |
3470d1 |
all languages. Argument usage in format strings is used to determine
|
|
Packit Service |
3470d1 |
which arguments may need to be freed
|
|
Packit Service |
3470d1 |
*/
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
static Log_MessageEntry_t log_messageTable[] =
|
|
Packit Service |
3470d1 |
{
|
|
Packit Service |
3470d1 |
{ LOG_MSG_TRUNCATED,
|
|
Packit Service |
3470d1 |
0, /* argument number which holds unit number, 0 -> none */
|
|
Packit Service |
3470d1 |
LOG_TRAP_NONE, /* trap func associated with message */
|
|
Packit Service |
3470d1 |
/* FUTURE - Binary Data */
|
|
Packit Service |
3470d1 |
/* Arguments: None */
|
|
Packit Service |
3470d1 |
{ /* Language Specific Entries */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */
|
|
Packit Service |
3470d1 |
/* description */ "Message truncated, out of Log Resources",
|
|
Packit Service |
3470d1 |
/* response */ "Some log text has been discarded",
|
|
Packit Service |
3470d1 |
/* correction */ "To avoid the loss of log text, reduce the logging options enabled",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_MSG_TRAP_FAILED,
|
|
Packit Service |
3470d1 |
0, /* argument number which holds unit number, 0 -> none */
|
|
Packit Service |
3470d1 |
LOG_TRAP_NONE, /* trap func associated with message */
|
|
Packit Service |
3470d1 |
/* FUTURE - Binary Data */
|
|
Packit Service |
3470d1 |
/* Arguments:
|
|
Packit Service |
3470d1 |
* arg1 -> erc
|
|
Packit Service |
3470d1 |
*/
|
|
Packit Service |
3470d1 |
{ /* Language Specific Entries */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */
|
|
Packit Service |
3470d1 |
/* description */ "Unable to Send Trap: %C",
|
|
Packit Service |
3470d1 |
/* response */ NULL,
|
|
Packit Service |
3470d1 |
/* correction */ NULL,
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
};
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
/*!
|
|
Packit Service |
3470d1 |
Module specific string table, referenced by Log_StringId_t.
|
|
Packit Service |
3470d1 |
*/
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
static Log_StringEntry_t log_stringTable[] =
|
|
Packit Service |
3470d1 |
{
|
|
Packit Service |
3470d1 |
{ LOG_STR_MODNAME, /* first entry must be 1-6 character package name */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "Log",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_RESPONSE, /* Prefix for Response part of message */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "Response: ",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_CORRECTION, /* Prefix for Correction part of message */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "Correction: ",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_TASK, /* Task Id reporting message */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "Task",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_FILENAME, /* Source file generating message */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "Filename",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_LINE, /* Source file line number generating message */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "Line",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_NULL, /* marker to indicate a NULL %s or %F argument was passed */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "(NULL)",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_NOMEMORY, /* marker to indicate a LOG_ALLOC_ERROR argument was passed */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "(No Memory)",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_DUMP, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "D",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_FATAL, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "F",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_ERROR, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "E",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_ALARM, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "A",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_WARNING, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "W",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_PARTIAL, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "p",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_CONFIG, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "C",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_PROGRAM_INFO, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "I",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_PERIODIC_INFO, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "P",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_DEBUG1, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "1",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_DEBUG2, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "2",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_DEBUG3, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "3",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_DEBUG4, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "4",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_DEBUG5, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "5",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
{ LOG_STR_SEV_PURGE, /* 1 character indication of severity */
|
|
Packit Service |
3470d1 |
{ /* LOG_LANG_ENGLISH */ "X",
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
},
|
|
Packit Service |
3470d1 |
};
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
/*!
|
|
Packit Service |
3470d1 |
Add String table to logging subsystem's tables.
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
This must be run early in the boot to initialize tables prior to
|
|
Packit Service |
3470d1 |
any logging functions being available.
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
@return None
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
@heading Concurrency Considerations
|
|
Packit Service |
3470d1 |
Must be run once, early in boot
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
@heading Special Cases and Error Handling
|
|
Packit Service |
3470d1 |
None
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
@see Log_AddStringTable
|
|
Packit Service |
3470d1 |
*/
|
|
Packit Service |
3470d1 |
|
|
Packit Service |
3470d1 |
void
|
|
Packit Service |
3470d1 |
Log_AddMessages()
|
|
Packit Service |
3470d1 |
{
|
|
Packit Service |
3470d1 |
Log_AddStringTable(MOD_LOG, log_stringTable,
|
|
Packit Service |
3470d1 |
GEN_NUMENTRIES(log_stringTable));
|
|
Packit Service |
3470d1 |
Log_AddMessageTable(MOD_LOG, log_messageTable,
|
|
Packit Service |
3470d1 |
GEN_NUMENTRIES(log_messageTable));
|
|
Packit Service |
3470d1 |
}
|