How to change the log file in the server in MobileFirst 6.3 - ibm-mobilefirst

We are using mobilefirst 6.3 in a production Websphere liberty profile.
Is there a way in mobilefirst to change the default log file, without using some custom java functions to log? we want to have the logs from our adapters separately from the server logs.

This is not related to IBM MobileFirst Platform, but to WebSphere Liberty which MFP is deployed to. It's an important distinction to make - all logging goes through the hosting application server, not through MFP.
To my knowledge and after reading the Liberty documentation - this is not possible in a straight-forward, official, capacity.
What you could perhaps do is:
Understand from the messages.log file which logs you'd like to filter. All log lines begin with a specific tag like FW123456
Write a script that will scan the messages.log file for occurrences of required tag
Copy the specific log line and save it in a different file

Related

Separate trace/log file per runtime and wlapp

By default all MobileFirst logging goes into the application server log files.
As a server can have multiple runtimes and each runtime multiple applications and adapters, everything goes into a single file.
Is there a way to have separate log/trace file for each MFP runtime, adapter and/or wlapp application?
MobileFirst Platform Server uses the application server's logging facilities, so the logs and trace go wherever the application server decides to put them.
WebSphere Application Server, Liberty Core, and Tomcat, all have various (and different...) ways to configure the app server logging in ways that may meet some of your needs (like logging per-application, for example - each MobileFirst runtime is a separate "application", as far as the app server is concerned - or separating logs from different facilities into different files). The MobileFirst Platform Server itself doesn't provide any special support for this - it just logs things, and lets the app server determine what to do with it. I can't think of a way you'd be able to do separate logging from different WLAPPs or adapters, since I can't think of any way that the app server could identify what WLAPP or adapter a log message is coming from and separate it from others.
However, depending on what you are trying to do, you may be able to extract the kind of information you want out of Operational Analytics.

How to deploy a local eclipse worklight project in cloud server?

I developed an android based hybrid app in the IBM MFP-7.0., My app is fetching the data from the Java service which is running in Tomcat Server. Here the app adapters are running in my local system MFP server to get the data from the Java service, So that I can only run the app in my local system android emulator. Now, we want to deploy the app in the cloud so that we can give this app to our users. Can some body help me how to run our MFP app in the cloud? Is it required to place eclipse in the cloud to run my MFP server like the way I am running in my local system?
Thanks in advance.
It looks to me like your understanding is completely lacking in this subject matter. Also note that this question has got nothing to do with programming.
You need a host machine. On this server you will run an application server (Tomcat, WebSphere Full profile, WebSphere Liberty profile - either single or a farm, depending on your required network topology and security & scalability needs).
On this application server you deploy MobileFirst
You will also need a database
This host machine needs to be accessible (with appropriate security) to the public Internet so that it could serve apps installed in end-users' devices
The application needs to be configured to send requests to the server (or to any front-side server like a Load Balancer, again, depending on your topology)
The generated application needs to be submitted to an App Store so that users could download and install it on their devices
I suggest that you will do some reading before asking any question. Since you're using IBM MobileFirst, start by reading the user documentation: http://www-01.ibm.com/support/knowledgecenter/SSNJXP/welcome.html

MobileFirst application not using deployed adapter, attempting to use development server adapter instead

I'm running MobileFirst 7.0 on a Liberty installation.
Having successfully deployed my application and adapter into the runtime, the preview, when run from the servers operations console, is apparently trying to communicate with the adapter from the development server rather than the one running on Liberty.
[/MaximoMobile/apps/services/api/PhyCount/common/query] failure. state: 404, response: undefined
The runtime on the server is not called MaximoMobile, that is just the name of the project within Eclipse. It shouldn't be being referenced at all outside of the local copy of Mobilefirst.
I've looked up documentation in instructing the application to use the deployment server rather than the development server using JNDI entries in the server.xml file (http://www-01.ibm.com/support/knowledgecenter/SSHSCD_6.3.0/com.ibm.worklight.deploy.doc/admin/t_using_JNDI_lookup_to_override_WL_properties.html), but I can't see anything incorrectly set, or anything even relating to the adapter.
I have managed to set the endpoint to /worklight as required using Eclipse, but it's still returning 404 and attempting to access a non-existent file.
Answering my own question for people who may later stumble upon this looking for an answer:
The preview on the server doesn't work in the same way as the local preview does, and any part of the interface that requires an adapter won't function.
If you need to test the connection to the server, deploying to a device will allow you to do so!

Turn Off Worklight server logging from server.xml

I know that I can turn off the logging on server.xml for the developer edition.
But we are running WL enterprise 6.2.0.1, where can I find the server.xml to turn off the adapters logging.?
I do not think this has to do with your project specifically.
In the application server's server.xml (if you followed the deployment instructions for Worklight projects as provided in the Knowledge Center) you should have an entry specifying your Worklight project.
In this same file, you need to configure the logging level for com.worklight.
See here: Logging mechanisms
Maybe this will work:
<logging traceSpecification="com.worklight.*=info=disabled"/>
You need to play with it per the WebSphere documentation (as it is not related to Worklight per-se).
Related question (you need to do the opposite of the written in the answer): IBM Worklight 6.0 - How to enable/view WL.Logger.debug in adapters?

Using Multiple Worklight 6.0 WAR Installs with WebSphere Analytics

When using the WebSphere Analytics Platform, can multiple Worklight 6.0 application WAR installations (i.e. consoles) point to a single instance of the Analytics piece? Or, do you have to install a separate Analytics instance for each WAR?
Yes, you can have more than one WAR pointing to the same IWAP (IBM WebSphere Analytics Platform) instance; you also can point to different IWAP instances if you want to. When you search in IWAP, it will display from which application the information in the search came from.