1 /*
2 * Copyright (c) 2008 Texas Instruments. All rights reserved.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v1.0 and Eclipse Distribution License
5 * v. 1.0 which accompanies this distribution. The Eclipse Public License is
6 * available at http://www.eclipse.org/legal/epl-v10.html and the Eclipse
7 * Distribution License is available at
8 * http://www.eclipse.org/org/documents/edl-v10.php.
9 *
10 * Contributors:
11 * Texas Instruments - initial implementation
12 * */
13 /*
14 * ======== LoggerSys.xdc ========
15 */
16
17 /*!
18 * ======== LoggerSys ========
19 * A logger which routes events to the `System_printf` function.
20 *
21 * This logger processes log events as they are generated and routes
22 * them through the `{@link System#printf System_printf()}` function.
23 * The final disposition of the log event is dependent on which system
24 * provider has been assigned to the
25 * `{@link System#SupportProxy System.SupportProxy}` configuration parameter.
26 *
27 * Note that the log events are processed within the runtime context
28 * of the `{@link Log Log_write()}` or `{@link Log Log_print()}` function
29 * that generated the event. It is important to account for the processing
30 * overhead and stack usage imposed on the runtime context. The cost of
31 * this processing is defined by the implementation of the system provider.
32 *
33 * @a(Examples) 34 * Configuration example: The following XDC configuration statements
35 * create a logger instance, assign it as the default logger for all
36 * modules, and enable `USER1` logging in all modules of the package
37 * `my.pkg`. See the `{@link Diags#setMaskMeta Diags.setMaskMeta()}` function
38 * for details on specifying the module names.
39 *
40 * @p(code) 41 * var Defaults = xdc.useModule('xdc.runtime.Defaults');
42 * var Diags = xdc.useModule('xdc.runtime.Diags');
43 * var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
44 *
45 * var LoggerSysParams = new LoggerSys.Params();
46 * Defaults.common$.logger = LoggerSys.create(LoggerSysParams);
47 * Diags.setMaskMeta("my.pkg.%", Diags.USER1, Diags.RUNTIME_ON);
48 * @p 49 */
50
51 module LoggerSys inherits ILogger {
52
53 /*!
54 * ======== ITimestampProxy ========
55 * User supplied time-stamp proxy
56 *
57 * This proxy allows `LoggerSys` to use a timestamp server different
58 * from the server used by `{@link xdc.runtime.Timestamp}`. However, if
59 * not supplied by a user, this proxy defaults to whichever timestamp
60 * server is used by `Timestamp`.
61 */
62 proxy TimestampProxy inherits ITimestampClient;
63
64 instance:
65
66 /*!
67 * ======== create ========
68 * Create a `LoggerSys` logger
69 *
70 * The logger instance will route all log events it receives to
71 * the {@link System#printf} function.
72 */
73 create();
74
75 internal:
76
77 struct Instance_State {
78 Bool enabled;
79 };
80 }
81 /*
82 * @(#) xdc.runtime; 2, 1, 0,0; 11-8-2017 17:11:26; /db/ztree/library/trees/xdc/xdc-D20.1/src/packages/
83 */
84