简体   繁体   中英

send log file from backend to UI using mmc rest API- logic for sending only the changes in file

I am trying to use rest APIs provided by mule management console to retrieve server log files. http://www.mulesoft.org/documentation/display/current/Servers

My intention is to use this List File API

http://localhost:8080/mmc-console-3.4.0/api/servers/{serverId}/files/{relativePathToFile}[?metadata=true] 

provided and display the logs in UI.

1) What should be the return type of the method I make as the above API call is returning a file? Would it be 'File' ?

2) Since the size of the mule_ee.log file could be large, I want to send the entire file for first call and from next call I just want to send the few lines appended at the last so that UI will do the appending and show it in console. Is this feasible ? Is there a better approach to do this ?

As per documentation you will get the file itself. However there is no incremental mechanism.

For this matters you should probably use rsync or an advanced log distribution system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM