phosphor-logging Create API with Resolution
Kun Zhao
zkxz at hotmail.com
Fri Nov 5 07:55:53 AEDT 2021
On 11/4/2021 2:35 AM, Patrick Williams wrote:
> On Wed, Nov 03, 2021 at 11:53:17PM +0000, Kun Zhao wrote:
>> Hi Team,
>>
>> We have a requirement to provide the value of Resolution property at the time of log creation with phosphor-logging Create API. But current Create() API doesn’t support Resolution as a parameter, we have to do two steps (create entry, set-property of Resolution of this entry) for it.
>> Any suggestions? Modify Create() API or add a new CreateWithResolution() API?
>
> I suspect we're going to have other use-cases come up going forward where other
> people want to fill in other properties, so having CreateWithNNN APIs sounds
> like it'll start having clutter.
Agree.
>
> Can we enhance the handling of the AdditionalData field to take fully-qualified
> property names and place those in the appropriate property at create time,
> rather than placing them in AdditionalData? What I mean by this is that if you
> pass a key of "xyz.openbmc_project.Logging.Entry.Resolution" it will place the
> value in the ...Entry.Resolution property at creation. Any non-FQPN will stay
> in AdditionalData.
>
I think this is a better way. Thanks for the suggestion.
--
Kun
More information about the openbmc
mailing list