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.
Related
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
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
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!
When you access to worklight console you have the list of runtime environments deployed (.war projects). Then you can enter to each environment and operate with the applications, adapters, analytics, etc.
Reading the documentation I found there are several roles you can configure to operate with the worklight console.
The question is if it is possible to configure those roles per runtime environment, or any other way to define different group of users that will have permission to access to each runtime environment.
If it is not, would it be supported to install more than one Worklight console in the same WAS server? This way we could define different roles for each console.
Concerning the question about deploying several Worklight consoles in the same WAS server, the response is yes. You have to use of course different context roots for the different Worklight consoles/Worklight admin services and specify a different value for the JNDI property ibm.worklight.admin.environmentid. The Worklight runtime must have the same ibm.worklight.admin.environmentid that the one used for the console that handles this runtime.
There is no differentiation between runtimes (in either Worklight Foundation 6.2 or MobileFirst Platform Foundation 6.3).
After logging-in (to the Management console), the role the user is applied with will be the one used for any interaction with any runtime.
You may submit an enhancement request: https://developer.ibm.com/mobilefirstplatform/help/
Right now i am developing an app on remote DEV server. Every time when i update the code (js,html,css etc) then test on the device locally. There is a popup to force me to update the app. But my app need to connect DEV server for testing some backend feature like login.
DEV server is a remote Websphere running WL6.1 for development purpose. Why i need it because my app connect to some web services like Auth server via internal environment (actually is VPN). And those services i cannot set up easily in local environment. That makes using localhost for development is not really possible.
My problem is feeling the development process not really handy. Every time i change the code and want to run on the devices. I need to upload the .wlapp via console. It takes time! Everyday i change the code thousands time. That's why i need a solution.
And now i am seeking for 2 possible ways:
Auto push the .wlapp to remote server when i run and build. Can ANT do that? i read the Doc and find it's a bit of complicated.
Disable Direct Update. Actually i do a tricky hack inside worklight.js to override this feature. But i think it is not a good solution. So, is there any server config can switch the that off?
And i read this thread IBM Worklight - How to disable Direct Update?
Not working.
From what you are describing, things seem to work exactly as they should.
You have your local Worklight Development Server (that's the Worklight Studio plug-in you've installed in your Eclipse).
You have a remote server - here I am presuming this is actually some application server with Worklight Server deployed on it (that is, not the plug-in, but an actual installation of the server component) as well as your deployed project's .war file.
If that's not your setup, you need to think again about your 'testing setup'.
Auto push the .wlapp file to remote server. So the dev server always
keep the latest resource. Not to force me "update" the older version
on the server.
No. You can't do this. You need to manually build your app with the correct connectivity settings for the remote server via Run As > Build Settings and Remote Target.
In addition to the native project that will now contain these connectivity settings for the actual app, you will also have a .wlapp file in the bin folder. You will need to manually deploy it each time you're changing your app's contents. That's why you do development testing in the local development server... when moving to a remote server, that's for QA/UAT/PROD purposes usually.
Just disable this annoying feature in DEV environment.
You will need to do this in both servers via their respective Worklight Console as described in the question you've linked to, so that once you deploy the .wlapp file, it will not send a Direct Update request.
Instead, you'll need to manually re-install the app each time.
I suspect you didn't do this action on the remote server?
If you did, then you need to explain your setup, as the only thing you've wrote about was its name... "dev".
No. You need to manually deploy the .wlapp to your remote server.