how do I change facility in glog from the default user facility? - syslog

I see that glog messages are getting logged with 'user' facility. Where does it set and how do I change it dynamically from my application?

You can use below command line to set glog
./your_application --logtostderr=1
The official document has a complete introduction link

Related

Xamarin.Forms AppResources: When localizing, how to "look up" the default language translation at runtime

I have an XF app that I'm trying to provide multiple languages for using resx/AppResources files. However, I have a need to be able to access the English (default language values) at runtime for logging purposes. Basically the app has Activities that the user can complete. Each activity has a title that is translated. When an activity is completed by the user I want to log it too my server so I can see which activities are being used the most. Obviously I'd rather not log the Chinese titles.
What are the best way(s) I can retrieve the default language values regardless of what the App's current language is set to?
Regards,
Sean
On Android:
Locale.Default.GetDisplayLanguage(Locale.Default)
On IOS:
var te = NSLocale.CurrentLocale.LocaleIdentifier;

Recommended way to get payment methods/configurations in Intershop 7.10

Intershop 7.10, I am trying to understand what is a recommended way to retrieve payment methods/configurations for a domain.
I have examined ViewPaymentMethodList_52-ListAll pipeline in sld_ch_consumer_plugin cartridge and I see that it is using a deprecated pipelet GetPaymentConfigurationsByDomain, and when I examine that pipelet I see that it is using PaymentServiceMgr which is also deprecated.
What would be non-deprecated way to do that.
EDIT:
I am trying to access whether the payment method is enabled or disabled for a given application:
Haven't tested it, but the information you're trying to get should become available when calling:
PaymentConfiguration config = paymentServiceBO.
getExtension(PersistenObjectBOExtension.class).getPersistentObject();
// retrieve the list of activated application ids
config.createApplicationIDsIterator();

Change user's pwdChangedTime attribute in openldap

When I change pwdChangedTime in Openldap, it gives an error like the following. How can I change the pwdChangetime value as admin without changing the user's password?
ldap_modify: Constraint violation (19)
additional info: pwdChangedTime: no user modification allowed
How can I change user's pwdChangedTime attribute in openldap 2.4.41?
As you already experienced pwdChangedTime is a special attribute set by the server, a so-called operational attribute. Normally this cannot be altered by a user application.
But OpenLDAP supports the so-called Relax Rules control which can be used if the bound client is authorized for manage operations.
When using OpenLDAP CLI tools you can simply use:
ldapmodify -e relax [..more options..]

How to create a field and an action on field in Plone 5?

I have installed a Plone with the following information:
Plone vr 5.0.7 (5017)
CMF 2.2.10
Zope 2.13.26
Python 2.7.13 (default, Jul 26 2017, 16:31:12) [GCC 4.3.0] PIL 1.1.7
Was wondering how can I relate a field (when you add a field on content type) to an action!
So the idea is to create a field that admin can choose which user group can receive an email/notification when the content is published. I know I can add a rule content for emailing but I would have a choice to choose which user group can receive it. Could be an add-on or something in Plone?
Thank you!
Add a "User's group" condition in the content rule declaration.
To actually add a field and relate it to an action, you'd need to program dedicated content-types.
Yet, as you want to grant the privilege "get mail on publication" to certain groups, it would be consistent to solve this as a permission-assignments, meaning to grant the groups a local-role on the item.
In concrete that would boil down to these steps:
Create a new role, e.g. "Receiver".
Install "collective.contentrules.mailtorole".
Create a global content-rule which checks on publication of any item who holds the local-role "Receiver" on the item, and sends the mail to them.
The admin can then assign the groups to the new role "Receiver" via the sharing-tab of an item.

Is it possible to get a list of workflows of current user in Alfresco

How to get a list of active workflows/tasks of current user in Alfresco by JavaScript API ?
It is require to create a rule which will write active tasks to the some file and hang/attach this rule to/on a folder.
Yes it is possible to get the list of workflows.
You can do that with the following api.
GET /alfresco/service/api/task-instances?authority={authority?}&state={state?}&priority={priority?}&pooledTasks={pooledTasks?}&dueBefore={dueBefore?}&dueAfter={dueAfter?}&properties={properties?}&maxItems={maxItems?}&skipCount={skipCount?}&exclude={exclude?}
GET /alfresco/service/api/workflow-instances/{workflow_instance_id}/task-instances?authority={authority?}&state={state?}&priority={priority?}&dueBefore={isoDate?}&dueAfter={isoDate?}&properties={prop1, prop2, prop3...?}&maxItems={maxItems?}&skipCount={skipCount?}&exclude={exclude?}
Note: You can set your own parameters according to your requirements in the request
See the documentation.

Resources