Matt Spinler | 93ae7e6 | 2019-05-29 11:13:48 -0500 | [diff] [blame] | 1 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 2 | This interface contains a Create method, which can be implemented to allow |
| 3 | creation of xyz.openbmc_project.Logging.Entry objects directly over D-Bus, |
| 4 | without needing the errors defined in the *.Error/metadata.yaml files. |
Matt Spinler | 93ae7e6 | 2019-05-29 11:13:48 -0500 | [diff] [blame] | 5 | |
| 6 | methods: |
| 7 | - name: Create |
| 8 | description: > |
| 9 | Create a xyz.openbmc_project.Logging.Entry object. |
| 10 | parameters: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 11 | - name: Message |
| 12 | type: string |
| 13 | description: > |
| 14 | The Message property of the event entry. |
| 15 | - name: Severity |
| 16 | type: enum[xyz.openbmc_project.Logging.Entry.Level] |
| 17 | description: > |
| 18 | The Severity property of the event entry. |
| 19 | - name: AdditionalData |
| 20 | type: dict[string, string] |
| 21 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 22 | The AdditionalData property of the event entry. e.g.: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 23 | { |
| 24 | "key1": "value1", |
| 25 | "key2": "value2" |
| 26 | } |
| 27 | ends up in AdditionaData like: |
| 28 | ["KEY1=value1", "KEY2=value2"] |
Matt Spinler | 6e7634d | 2019-10-24 15:58:13 -0500 | [diff] [blame] | 29 | |
| 30 | - name: CreateWithFFDCFiles |
| 31 | description: > |
| 32 | Create an xyz.openbmc_project.Logging.Entry object and pass in an |
| 33 | array of file descriptors for files that contain FFDC (first failure |
| 34 | data capture) data which may be used by event log extensions that |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 35 | support storing it with their event logs. The other arguments are the |
| 36 | same as with Create(). The FFDC argument is ignored by the base |
| 37 | phosphor-logging event logs. |
Matt Spinler | 6e7634d | 2019-10-24 15:58:13 -0500 | [diff] [blame] | 38 | |
| 39 | When the method call is complete the descriptors must be closed and |
| 40 | the files can be deleted if desired. |
| 41 | parameters: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 42 | - name: Message |
| 43 | type: string |
| 44 | description: > |
| 45 | The Message property of the event entry. |
| 46 | - name: Severity |
| 47 | type: enum[xyz.openbmc_project.Logging.Entry.Level] |
| 48 | description: > |
| 49 | The Severity property of the event entry. |
| 50 | - name: AdditionalData |
| 51 | type: dict[string, string] |
| 52 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 53 | The AdditionalData property of the event entry. e.g.: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 54 | { |
| 55 | "key1": "value1", |
| 56 | "key2": "value2" |
| 57 | } |
| 58 | ends up in AdditionaData like: |
| 59 | ["KEY1=value1", "KEY2=value2"] |
| 60 | - name: FFDC |
| 61 | type: array[struct[enum[self.FFDCFormat], byte, byte, unixfd]] |
| 62 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 63 | File descriptors for any files containing FFDC, along with |
| 64 | metadata about the contents: |
Matt Spinler | 6e7634d | 2019-10-24 15:58:13 -0500 | [diff] [blame] | 65 | |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 66 | FFDCFormat- The format type of the contained data. |
| 67 | subType - The format subtype, used for the 'Custom' type. |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 68 | version - The version of the data format, used for the |
| 69 | 'Custom' |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 70 | type. |
| 71 | unixfd - The file descriptor to the data file. |
Matt Spinler | 6e7634d | 2019-10-24 15:58:13 -0500 | [diff] [blame] | 72 | |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 73 | e.g.: [ |
| 74 | {"xyz.openbmc_project.Logging.Create.FFDCFormat.JSON", 0, 0, |
| 75 | 5}, |
| 76 | {"xyz.openbmc_project.Logging.Create.FFDCFormat.Custom", 1, 2, |
| 77 | 6} ] |
Matt Spinler | 6e7634d | 2019-10-24 15:58:13 -0500 | [diff] [blame] | 78 | |
| 79 | enumerations: |
| 80 | - name: FFDCFormat |
| 81 | description: > |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 82 | format types |
Matt Spinler | 6e7634d | 2019-10-24 15:58:13 -0500 | [diff] [blame] | 83 | values: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 84 | - name: JSON |
| 85 | description: > |
| 86 | Valid fully formed JSON, e.g. {"foo":"bar"} |
| 87 | - name: CBOR |
| 88 | description: > |
| 89 | Valid CBOR (Concise Binary Object Representation) |
| 90 | - name: Text |
| 91 | description: > |
| 92 | ASCII text |
| 93 | - name: Custom |
| 94 | description: > |
| 95 | Something other than the above formats |