All of lore.kernel.org
 help / color / mirror / Atom feed
* phosphor-logging Create API with Resolution
@ 2021-11-03 23:53 Kun Zhao
  2021-11-04  9:35 ` Patrick Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Kun Zhao @ 2021-11-03 23:53 UTC (permalink / raw)
  To: openbmc@lists.ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

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?

Regards,
Kun

[-- Attachment #2: Type: text/html, Size: 2415 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: phosphor-logging Create API with Resolution
  2021-11-03 23:53 phosphor-logging Create API with Resolution Kun Zhao
@ 2021-11-04  9:35 ` Patrick Williams
  2021-11-04 20:55   ` Kun Zhao
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Williams @ 2021-11-04  9:35 UTC (permalink / raw)
  To: Kun Zhao; +Cc: openbmc@lists.ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]

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.

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.

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: phosphor-logging Create API with Resolution
  2021-11-04  9:35 ` Patrick Williams
@ 2021-11-04 20:55   ` Kun Zhao
  0 siblings, 0 replies; 3+ messages in thread
From: Kun Zhao @ 2021-11-04 20:55 UTC (permalink / raw)
  To: Patrick Williams; +Cc: openbmc@lists.ozlabs.org



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-04 20:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-03 23:53 phosphor-logging Create API with Resolution Kun Zhao
2021-11-04  9:35 ` Patrick Williams
2021-11-04 20:55   ` Kun Zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.