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 /*!
19 * ======== LoggerSys ========
20 * A logger which routes events to the system `printf` function.
21 *
22 * This logger processes log events as they are generated and routes
23 * them through the `{@link System#printf System_printf()}` function.
24 * The final disposition of the log event is dependent on which system
25 * provider has been assigned to the
26 * `{@link System#SupportProxy System.SupportProxy}` configuration parameter.
27 *
28 * Note that the log events are processed within the runtime context
29 * of the `{@link Log Log_write()}` or `{@link Log Log_print()}` function
30 * that generated the event. It is important to account for the processing
31 * overhead and stack usage imposed on the runtime context. The cost of
32 * this processing is defined by the implementation of the system provider.
33 *
34 * @a(Examples) 35 * Configuration example: The following XDC configuration statements
36 * create a logger instance, assign it as the default logger for all
37 * modules, and enable `USER1` logging in all modules of the package
38 * `my.pkg`. See the `{@link Diags#setMaskMeta Diags.setMaskMeta()}` function
39 * for details on specifying the module names.
40 *
41 * @p(code) 42 * var Defaults = xdc.useModule('xdc.runtime.Defaults');
43 * var Diags = xdc.useModule('xdc.runtime.Diags');
44 * var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
45 *
46 * var LoggerSysParams = new LoggerSys.Params();
47 * Defaults.common$.logger = LoggerSys.create(LoggerSysParams);
48 * Diags.setMaskMeta("my.pkg.%", Diags.USER1, Diags.RUNTIME_ON);
49 * @p 50 */
51
52 module LoggerSys inherits ILogger {
53
54 /*!
55 * ======== ITimestampProxy ========
56 * User supplied time-stamp proxy
57 *
58 * This proxy allows `LoggerSys` to use a timestamp server different
59 * from the server used by `{@link xdc.runtime.Timestamp}`. However, if
60 * not supplied by a user, this proxy defaults to whichever timestamp
61 * server is used by `Timestamp`.
62 */
63 proxy TimestampProxy inherits ITimestampClient;
64
65 instance:
66
67 /*!
68 * ======== create ========
69 * Create a `LoggerSys` logger
70 *
71 * The logger instance will route all log events it receives to
72 * the {@link System#printf} function.
73 */
74 create();
75 }
76 /*
77 * @(#) xdc.runtime; 2, 0, 0, 0,207; 6-9-2009 20:10:18; /db/ztree/library/trees/xdc-t50x/src/packages/
78 */
79