- add better logging for meeting create and doc conversion

This commit is contained in:
Richard Alam 2014-08-13 06:10:15 -07:00
parent b1c22ad8fd
commit 9b299a9f91
3 changed files with 20 additions and 9 deletions

View File

@ -188,8 +188,7 @@ public class MeetingService implements MessageListener {
}
private void handleCreateMeeting(Meeting m) {
log.debug("Storing Meeting with internal id:" + m.getInternalId());
log.debug(" ******************* Storing Meeting with internal id:" + m.getInternalId());
log.info("Storing Meeting with internalId=[" + m.getInternalId() + "], externalId=[" + m.getExternalId() + "], name=[" + m.getName() + "], duration=[" + m.getDuration() + "], record=[" + m.isRecord() + "]");
meetings.put(m.getInternalId(), m);
if (m.isRecord()) {
Map<String,String> metadata = new LinkedHashMap<String,String>();
@ -443,7 +442,7 @@ public class MeetingService implements MessageListener {
User user = m.getUserById(message.userId);
if(user != null){
user.setStatus(message.status, message.value);
log.debug("Setting new status value in meeting " + message.meetingId + " for participant:"+user.getFullname());
log.debug("Setting new status value in meeting " + message.meetingId + " for participant:" + user.getFullname());
return;
}
log.warn("The participant " + message.userId + " doesn't exist in the meeting " + message.meetingId);

View File

@ -23,8 +23,12 @@ import org.bigbluebutton.api.messaging.MessagingService;
import org.bigbluebutton.presentation.imp.ImageToSwfSlidesGenerationService;
import org.bigbluebutton.presentation.imp.OfficeToPdfConversionService;
import org.bigbluebutton.presentation.imp.PdfToSwfSlidesGenerationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DocumentConversionServiceImp implements DocumentConversionService {
private static Logger log = LoggerFactory.getLogger(DocumentConversionServiceImp.class);
private MessagingService messagingService;
private OfficeToPdfConversionService officeToPdfConversionService;
private PdfToSwfSlidesGenerationService pdfToSwfSlidesGenerationService;
@ -32,6 +36,8 @@ public class DocumentConversionServiceImp implements DocumentConversionService {
public void processDocument(UploadedPresentation pres) {
SupportedDocumentFilter sdf = new SupportedDocumentFilter(messagingService);
log.info("Start presentation conversion. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "], timestamp=[" + System.currentTimeMillis() + "]");
if (sdf.isSupported(pres)) {
String fileType = pres.getFileType();
@ -54,6 +60,9 @@ public class DocumentConversionServiceImp implements DocumentConversionService {
} else {
// TODO: error log
}
log.info("End presentation conversion. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "], timestamp=[" + System.currentTimeMillis() + "]");
}
public void setMessagingService(MessagingService m) {

View File

@ -63,7 +63,7 @@ public class PdfToSwfSlidesGenerationService {
public void generateSlides(UploadedPresentation pres) {
log.debug("Generating slides");
determineNumberOfPages(pres);
log.debug("Determined number of pages " + pres.getNumberOfPages());
log.info("Determined number of pages. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "], numPages=[" + pres.getNumberOfPages() + "]");
if (pres.getNumberOfPages() > 0) {
convertPdfToSwf(pres);
// createPngImages(pres);
@ -97,21 +97,23 @@ public class PdfToSwfSlidesGenerationService {
}
private void createThumbnails(UploadedPresentation pres) {
log.debug("Creating thumbnails.");
log.info("Creating thumbnails. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "]");
notifier.sendCreatingThumbnailsUpdateMessage(pres);
thumbnailCreator.createThumbnails(pres);
}
private void createTextFiles(UploadedPresentation pres) {
log.debug("Creating textfiles for accessibility.");
log.info("Creating textfiles for accessibility. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "]");
notifier.sendCreatingTextFilesUpdateMessage(pres);
textFileCreator.createTextFiles(pres);
}
private void createPngImages(UploadedPresentation pres) {
log.debug("Creating PNG images.");
log.info("Creating PNG images. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "]");
notifier.sendCreatingPngImagesUpdateMessage(pres);
pngImageCreator.createPngImages(pres);
}
private void convertPdfToSwf(UploadedPresentation pres) {
int numPages = pres.getNumberOfPages();
List<PdfToSwfSlide> slides = setupSlides(pres, numPages);
@ -149,7 +151,7 @@ public class PdfToSwfSlidesGenerationService {
slidesCompleted++;
notifier.sendConversionUpdateMessage(slidesCompleted, pres);
} else {
log.info("Timedout waiting for page to finish conversion.");
log.warn("Timedout waiting for page to finish conversion. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "]");
}
} catch (InterruptedException e) {
log.error("InterruptedException while creating slide " + pres.getName());
@ -160,7 +162,8 @@ public class PdfToSwfSlidesGenerationService {
for (final PdfToSwfSlide slide : slides) {
if (! slide.isDone()){
log.warn("Creating blank slide for " + slide.getPageNumber());
log.warn("Creating blank slide. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "], page=[" + slide.getPageNumber() + "]");
slide.generateBlankSlide();
notifier.sendConversionUpdateMessage(slidesCompleted++, pres);
}