Implement ability to override default error level

Errors reported by the phosphor-logging app have a default error level,
and this level is specified in the error's YAML definition.

Enable users of the error's report() API to specify an error level. A
user may perceive a different error level for an error scenario, for eg
there may be certain host errors (for which we set the level as 'Error')
that may just be 'Warnings'.

Change-Id: I666a0ddcb099e530c423358a3b1c65f33b0ad01e
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/xyz/openbmc_project/Logging/Internal/Manager.interface.yaml b/xyz/openbmc_project/Logging/Internal/Manager.interface.yaml
index 97ed3c9..4c1c8ce 100644
--- a/xyz/openbmc_project/Logging/Internal/Manager.interface.yaml
+++ b/xyz/openbmc_project/Logging/Internal/Manager.interface.yaml
@@ -6,7 +6,8 @@
     - name: Commit
       description: >
           Write the requested error/event entry with its associated metadata
-          fields to flash.
+          fields to flash. The "level" of the committed error log is same as the
+          level defined in error YAML definitions.
       parameters:
         - name: transactionId
           type: uint64
@@ -17,3 +18,22 @@
           description: >
               The error exception message associated with the error
               event log to be committed.
+    - name: CommitWithLvl
+      description: >
+          Write the requested error/event entry with its associated metadata
+          fields to flash. This interface allows the caller to override the
+          error level specified in the error YAML definition.
+      parameters:
+        - name: transactionId
+          type: uint64
+          description: >
+              The unique identifier of the journal entry(ies) to be committed.
+        - name: errMsg
+          type: string
+          description: >
+              The error exception message associated with the error
+              event log to be committed.
+        - name: errLvl
+          type: uint32
+          description: >
+              The error level/severity indicator.